mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 14:43:47 +00:00
Merge branch 'PBR_ProbeArrayGLWIP' of https://github.com/Azaezel/Torque3D into development
This commit is contained in:
commit
82881f0875
407 changed files with 47737 additions and 6168 deletions
|
|
@ -1,190 +1,190 @@
|
|||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
1029
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1250
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by SELiCE (ls@selice.cz - http://ls.selice.cz)
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
Instalovat $(^Name)
|
||||
# ^UninstallCaption
|
||||
Odinstalovat $(^Name)
|
||||
# ^LicenseSubCaption
|
||||
: Licenční ujednání
|
||||
# ^ComponentsSubCaption
|
||||
: Možnosti instalace
|
||||
# ^DirSubCaption
|
||||
: Umístění instalace
|
||||
# ^InstallingSubCaption
|
||||
: Instaluje se
|
||||
# ^CompletedSubCaption
|
||||
: Dokončeno
|
||||
# ^UnComponentsSubCaption
|
||||
: Možnosti odinstalace
|
||||
# ^UnDirSubCaption
|
||||
: Odinstalovat adresář
|
||||
# ^ConfirmSubCaption
|
||||
: Potvrzení
|
||||
# ^UninstallingSubCaption
|
||||
: Odinstalování
|
||||
# ^UnCompletedSubCaption
|
||||
: Dokončeno
|
||||
# ^BackBtn
|
||||
< &Zpět
|
||||
# ^NextBtn
|
||||
&Další >
|
||||
# ^AgreeBtn
|
||||
Souhl&asím
|
||||
# ^AcceptBtn
|
||||
Souhl&asím s podmínkami Licenčního ujednání
|
||||
# ^DontAcceptBtn
|
||||
&Nesouhlasím s podmínkami Licenčního ujednání
|
||||
# ^InstallBtn
|
||||
&Instalovat
|
||||
# ^UninstallBtn
|
||||
&Odinstalovat
|
||||
# ^CancelBtn
|
||||
Storno
|
||||
# ^CloseBtn
|
||||
&Zavřít
|
||||
# ^BrowseBtn
|
||||
P&rocházet...
|
||||
# ^ShowDetailsBtn
|
||||
Zobrazit &detaily
|
||||
# ^ClickNext
|
||||
Pro pokračování klikněte na 'Další'.
|
||||
# ^ClickInstall
|
||||
Klikněte na 'Instalovat' pro zahájení instalace.
|
||||
# ^ClickUninstall
|
||||
Klikněte na 'Odinstalovat' pro zahájení odinstalace.
|
||||
# ^Name
|
||||
Název
|
||||
# ^Completed
|
||||
Dokončeno
|
||||
# ^LicenseText
|
||||
Před instalací $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, klikněte 'Souhlasím'.
|
||||
# ^LicenseTextCB
|
||||
Před instalací $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte políčko dole. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Před instalací $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte níže první možnost. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Před odinstalování $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, klikněte 'Souhlasím'.
|
||||
# ^UnLicenseTextCB
|
||||
Před odinstalování $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte políčko dole. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Před odinstalování $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte níže první možnost. $_CLICK
|
||||
# ^Custom
|
||||
Vlastní
|
||||
# ^ComponentsText
|
||||
Zvolte součásti, které chcete nainstalovat a nezatrhněte součásti, které instalovat nechcete. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Zvolte způsob instalace:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Zvolte součásti k instalaci:
|
||||
# ^ComponentsSubText2
|
||||
Nebo zvolte volitelné součásti, které chcete nainstalovat:
|
||||
# ^UnComponentsText
|
||||
Zatrhněte součásti, které chcete odinstalovat a nezatrhněte součásti, které odinstalovat nechcete. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Zvolte způsob odinstalace:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Zvolte součásti pro odinstalaci:
|
||||
# ^UnComponentsSubText2
|
||||
Nebo zvolte jednotlivé součásti, které chcete odinstalovat:
|
||||
# ^DirText
|
||||
Setup nyní nainstaluje program $(^NameDA) do následující složky. Pro instalaci do jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
|
||||
# ^DirSubText
|
||||
Cílová složka
|
||||
# ^DirBrowseText
|
||||
Zvolte složku kam instalovat program $(^NameDA):
|
||||
# ^UnDirText
|
||||
Setup nyní odinstaluje program $(^NameDA) z následující složky. Pro odinstalaci z jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Zvolte adresář pro odinstalaci $(^NameDA) z:
|
||||
# ^SpaceAvailable
|
||||
"Volné místo: "
|
||||
# ^SpaceRequired
|
||||
"Potřebné místo: "
|
||||
# ^UninstallingText
|
||||
Tento průvodce z Vašeho počítače odinstaluje $(^NameDA). $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Odinstalovat z:
|
||||
# ^FileError
|
||||
Nelze otevřít soubor pro zápis: \r\n\t"$0"\r\nStiskněte 'Přerušit' pro ukončení instalace\r\nnebo 'Znovu' pro další pokus nebo\r\n'Ignorovat' pro přeskočení souboru
|
||||
# ^FileError_NoIgnore
|
||||
Nelze otevřít soubor pro zápis: \r\n\t"$0"\r\nStiskněte 'Znovu' pro další pokus nebo\r\n*Storno* pro ukončení instalace
|
||||
# ^CantWrite
|
||||
"Nelze zapsat: "
|
||||
# ^CopyFailed
|
||||
Kopírování selhalo
|
||||
# ^CopyTo
|
||||
"Zkopírovat do "
|
||||
# ^Registering
|
||||
"Registrování: "
|
||||
# ^Unregistering
|
||||
"Odregistrování: "
|
||||
# ^SymbolNotFound
|
||||
"Nelze najít znak: "
|
||||
# ^CouldNotLoad
|
||||
"Nelze načíst: "
|
||||
# ^CreateFolder
|
||||
"Vytvořen adresář: "
|
||||
# ^CreateShortcut
|
||||
"Vytvořen zástupce: "
|
||||
# ^CreatedUninstaller
|
||||
"Vytvořen odinstalátor: "
|
||||
# ^Delete
|
||||
"Smazat soubor: "
|
||||
# ^DeleteOnReboot
|
||||
"Smazat po restartu: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Chyba při vytváření zástupce: "
|
||||
# ^ErrorCreating
|
||||
"Chyba při vytváření: "
|
||||
# ^ErrorDecompressing
|
||||
Chyba při rozbalování dat! Poškozený instalátor?
|
||||
# ^ErrorRegistering
|
||||
Chyba při registrování DLL
|
||||
# ^ExecShell
|
||||
"Spustit shell: "
|
||||
# ^Exec
|
||||
"Spustit: "
|
||||
# ^Extract
|
||||
"Rozbalit: "
|
||||
# ^ErrorWriting
|
||||
"Rozbalit: chyba při zápisu do souboru "
|
||||
# ^InvalidOpcode
|
||||
Instalátor je poškozen: nesprávný kontrolní kód
|
||||
# ^NoOLE
|
||||
"Nedostupné OLE pro: "
|
||||
# ^OutputFolder
|
||||
"Výstupní složka: "
|
||||
# ^RemoveFolder
|
||||
"Odstranit složku: "
|
||||
# ^RenameOnReboot
|
||||
"Přejmenovat při restartu: "
|
||||
# ^Rename
|
||||
"Přejmenováno: "
|
||||
# ^Skipped
|
||||
"Přeskočeno: "
|
||||
# ^CopyDetails
|
||||
Zkopírovat podrobnosti do schránky
|
||||
# ^LogInstall
|
||||
Zaznamenat průběh instalace
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
K
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
1029
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1250
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by SELiCE (ls@selice.cz - http://ls.selice.cz)
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
Instalovat $(^Name)
|
||||
# ^UninstallCaption
|
||||
Odinstalovat $(^Name)
|
||||
# ^LicenseSubCaption
|
||||
: Licenční ujednání
|
||||
# ^ComponentsSubCaption
|
||||
: Možnosti instalace
|
||||
# ^DirSubCaption
|
||||
: Umístění instalace
|
||||
# ^InstallingSubCaption
|
||||
: Instaluje se
|
||||
# ^CompletedSubCaption
|
||||
: Dokončeno
|
||||
# ^UnComponentsSubCaption
|
||||
: Možnosti odinstalace
|
||||
# ^UnDirSubCaption
|
||||
: Odinstalovat adresář
|
||||
# ^ConfirmSubCaption
|
||||
: Potvrzení
|
||||
# ^UninstallingSubCaption
|
||||
: Odinstalování
|
||||
# ^UnCompletedSubCaption
|
||||
: Dokončeno
|
||||
# ^BackBtn
|
||||
< &Zpět
|
||||
# ^NextBtn
|
||||
&Další >
|
||||
# ^AgreeBtn
|
||||
Souhl&asím
|
||||
# ^AcceptBtn
|
||||
Souhl&asím s podmínkami Licenčního ujednání
|
||||
# ^DontAcceptBtn
|
||||
&Nesouhlasím s podmínkami Licenčního ujednání
|
||||
# ^InstallBtn
|
||||
&Instalovat
|
||||
# ^UninstallBtn
|
||||
&Odinstalovat
|
||||
# ^CancelBtn
|
||||
Storno
|
||||
# ^CloseBtn
|
||||
&Zavřít
|
||||
# ^BrowseBtn
|
||||
P&rocházet...
|
||||
# ^ShowDetailsBtn
|
||||
Zobrazit &detaily
|
||||
# ^ClickNext
|
||||
Pro pokračování klikněte na 'Další'.
|
||||
# ^ClickInstall
|
||||
Klikněte na 'Instalovat' pro zahájení instalace.
|
||||
# ^ClickUninstall
|
||||
Klikněte na 'Odinstalovat' pro zahájení odinstalace.
|
||||
# ^Name
|
||||
Název
|
||||
# ^Completed
|
||||
Dokončeno
|
||||
# ^LicenseText
|
||||
Před instalací $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, klikněte 'Souhlasím'.
|
||||
# ^LicenseTextCB
|
||||
Před instalací $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte políčko dole. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Před instalací $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte níže první možnost. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Před odinstalování $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, klikněte 'Souhlasím'.
|
||||
# ^UnLicenseTextCB
|
||||
Před odinstalování $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte políčko dole. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Před odinstalování $(^NameDA) si prosím přečtěte licenční ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtněte níže první možnost. $_CLICK
|
||||
# ^Custom
|
||||
Vlastní
|
||||
# ^ComponentsText
|
||||
Zvolte součásti, které chcete nainstalovat a nezatrhněte součásti, které instalovat nechcete. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Zvolte způsob instalace:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Zvolte součásti k instalaci:
|
||||
# ^ComponentsSubText2
|
||||
Nebo zvolte volitelné součásti, které chcete nainstalovat:
|
||||
# ^UnComponentsText
|
||||
Zatrhněte součásti, které chcete odinstalovat a nezatrhněte součásti, které odinstalovat nechcete. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Zvolte způsob odinstalace:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Zvolte součásti pro odinstalaci:
|
||||
# ^UnComponentsSubText2
|
||||
Nebo zvolte jednotlivé součásti, které chcete odinstalovat:
|
||||
# ^DirText
|
||||
Setup nyní nainstaluje program $(^NameDA) do následující složky. Pro instalaci do jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
|
||||
# ^DirSubText
|
||||
Cílová složka
|
||||
# ^DirBrowseText
|
||||
Zvolte složku kam instalovat program $(^NameDA):
|
||||
# ^UnDirText
|
||||
Setup nyní odinstaluje program $(^NameDA) z následující složky. Pro odinstalaci z jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Zvolte adresář pro odinstalaci $(^NameDA) z:
|
||||
# ^SpaceAvailable
|
||||
"Volné místo: "
|
||||
# ^SpaceRequired
|
||||
"Potřebné místo: "
|
||||
# ^UninstallingText
|
||||
Tento průvodce z Vašeho počítače odinstaluje $(^NameDA). $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Odinstalovat z:
|
||||
# ^FileError
|
||||
Nelze otevřít soubor pro zápis: \r\n\t"$0"\r\nStiskněte 'Přerušit' pro ukončení instalace\r\nnebo 'Znovu' pro další pokus nebo\r\n'Ignorovat' pro přeskočení souboru
|
||||
# ^FileError_NoIgnore
|
||||
Nelze otevřít soubor pro zápis: \r\n\t"$0"\r\nStiskněte 'Znovu' pro další pokus nebo\r\n*Storno* pro ukončení instalace
|
||||
# ^CantWrite
|
||||
"Nelze zapsat: "
|
||||
# ^CopyFailed
|
||||
Kopírování selhalo
|
||||
# ^CopyTo
|
||||
"Zkopírovat do "
|
||||
# ^Registering
|
||||
"Registrování: "
|
||||
# ^Unregistering
|
||||
"Odregistrování: "
|
||||
# ^SymbolNotFound
|
||||
"Nelze najít znak: "
|
||||
# ^CouldNotLoad
|
||||
"Nelze načíst: "
|
||||
# ^CreateFolder
|
||||
"Vytvořen adresář: "
|
||||
# ^CreateShortcut
|
||||
"Vytvořen zástupce: "
|
||||
# ^CreatedUninstaller
|
||||
"Vytvořen odinstalátor: "
|
||||
# ^Delete
|
||||
"Smazat soubor: "
|
||||
# ^DeleteOnReboot
|
||||
"Smazat po restartu: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Chyba při vytváření zástupce: "
|
||||
# ^ErrorCreating
|
||||
"Chyba při vytváření: "
|
||||
# ^ErrorDecompressing
|
||||
Chyba při rozbalování dat! Poškozený instalátor?
|
||||
# ^ErrorRegistering
|
||||
Chyba při registrování DLL
|
||||
# ^ExecShell
|
||||
"Spustit shell: "
|
||||
# ^Exec
|
||||
"Spustit: "
|
||||
# ^Extract
|
||||
"Rozbalit: "
|
||||
# ^ErrorWriting
|
||||
"Rozbalit: chyba při zápisu do souboru "
|
||||
# ^InvalidOpcode
|
||||
Instalátor je poškozen: nesprávný kontrolní kód
|
||||
# ^NoOLE
|
||||
"Nedostupné OLE pro: "
|
||||
# ^OutputFolder
|
||||
"Výstupní složka: "
|
||||
# ^RemoveFolder
|
||||
"Odstranit složku: "
|
||||
# ^RenameOnReboot
|
||||
"Přejmenovat při restartu: "
|
||||
# ^Rename
|
||||
"Přejmenováno: "
|
||||
# ^Skipped
|
||||
"Přeskočeno: "
|
||||
# ^CopyDetails
|
||||
Zkopírovat podrobnosti do schránky
|
||||
# ^LogInstall
|
||||
Zaznamenat průběh instalace
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
K
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
G
|
||||
|
|
@ -1,191 +1,191 @@
|
|||
# Header, don't edit
|
||||
NLF v6
|
||||
# Start editing here
|
||||
# Language ID
|
||||
1065
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1256
|
||||
# RTL - anything else than RTL means LTR
|
||||
RTL
|
||||
# Translation By FzerorubigD - FzerorubigD@gmail.com - Thanx to all people help me in forum.persiantools.com, Elnaz Sarbar <elnaz@farsiweb.info>
|
||||
# ^Branding
|
||||
سٍستك لصب لاف<D8A7>سا<D8B3>ت %s
|
||||
# ^SetupCaption
|
||||
لصب $(^Name)
|
||||
# ^UninstallCaption
|
||||
حذ<EFBFBD> $(^Name)
|
||||
# ^LicenseSubCaption
|
||||
: كجنز لصب
|
||||
# ^ComponentsSubCaption
|
||||
: <20>زٍلم<D984>ماٌ لصب
|
||||
# ^DirSubCaption
|
||||
: <20>نشم لصب
|
||||
# ^InstallingSubCaption
|
||||
: در حاف لصب
|
||||
# ^CompletedSubCaption
|
||||
: <20>اٍال ٍا<D98D>ت
|
||||
# ^UnComponentsSubCaption
|
||||
: <20>زٍلم<D984>ماٌ حذ<D8AD>
|
||||
# ^UnDirSubCaption
|
||||
: <20>نشم حذ<D8AD>
|
||||
# ^ConfirmSubCaption
|
||||
: تأٍٍد
|
||||
# ^UninstallingSubCaption
|
||||
: در حاف حذ<D8AD>
|
||||
# ^UnCompletedSubCaption
|
||||
: <20>اٍال ٍا<D98D>ت
|
||||
# ^BackBtn
|
||||
&<26>بف
|
||||
# ^NextBtn
|
||||
&بغد
|
||||
# ^AgreeBtn
|
||||
&كنا<D986><D8A7>ك
|
||||
# ^AcceptBtn
|
||||
كل مكم بلدماٌ كجنز را <20>بنف &دارك
|
||||
# ^DontAcceptBtn
|
||||
كل بلدماٌ كجنز را <20>بنف &لدارك
|
||||
# ^InstallBtn
|
||||
&لصب
|
||||
# ^UninstallBtn
|
||||
&حذ<D8AD>
|
||||
# ^CancelBtn
|
||||
الصرا<EFBFBD>
|
||||
# ^CloseBtn
|
||||
&بستل
|
||||
# ^BrowseBtn
|
||||
&كرنر...
|
||||
# ^ShowDetailsBtn
|
||||
لكاٍش جزئٍات
|
||||
# ^ClickNext
|
||||
براٌ اداكم رنٌ د<>كم بغد <20>فٍ<D981> <20>لٍد.
|
||||
# ^ClickInstall
|
||||
براٌ شرنغ لصب رنٌ د<>كم لصب <20>فٍ<D981> <20>لٍد.
|
||||
# ^ClickUninstall
|
||||
براٌ شرنغ حذ<D8AD> رنٌ د<>كم حذ<D8AD> <20>فٍ<D981> <20>لٍد.
|
||||
# ^Name
|
||||
لاك
|
||||
# ^Completed
|
||||
<EFBFBD>اٍال ٍا<D98D>ت
|
||||
# ^LicenseText
|
||||
فظ<EFBFBD>اِ <20>بف از لصب $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ د<>كم كنا<D986><D8A7>ك <20>فٍ<D981> <20>لٍد.
|
||||
# ^LicenseTextCB
|
||||
فظ<EFBFBD>اِ <20>بف از لصب $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ جغبم لشالم<D984>زلٌ زٍر <20>فٍ<D981> <20>لٍد. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
فظ<EFBFBD>اِ <20>بف از لصب $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد <20>زٍلم انف را التخاب <20>لٍد. $_CLICK
|
||||
# ^UnLicenseText
|
||||
فظ<EFBFBD>اِ <20>بف از حذ<D8AD> $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ د<>كم كنا<D986><D8A7>ك <20>فٍ<D981> <20>لٍد.
|
||||
# ^UnLicenseTextCB
|
||||
فظ<EFBFBD>اِ <20>بف از حذ<D8AD> $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ جغبم لشالم<D984>زلٌ زٍر <20>فٍ<D981> <20>لٍد. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
فظ<EFBFBD>اِ <20>بف از حذ<D8AD> $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد <20>زٍلم انف را التخاب <20>لٍد. $_CLICK
|
||||
# ^Custom
|
||||
س<EFBFBD>ارشٌ
|
||||
# ^ComponentsText
|
||||
<EFBFBD>لار بخش<D8AE>ماٌٍ <20>م كٌ<D983>خنامٍد لصب شنلد لشالم بزلٍد ن لشالم بخش<D8AE>ماٌٍ را <20>م لكٌ<D983>خنامٍد لصب شنلد بردارٍد. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
لنغ لصب را كشخص <20>لٍد:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
بخش<EFBFBD>ماٌٍ را <20>م كٌ<D983>خنامٍد لصب شنلد التخاب <20>لٍد:
|
||||
# ^ComponentsSubText2
|
||||
ٍا<EFBFBD> بخش<D8AE>ماٌ اختٍارٌ را <20>م كٌ<D983>خنامٍد لصب شنلد التخاب <20>لٍد:
|
||||
# ^UnComponentsText
|
||||
<EFBFBD>لار بخش<D8AE>ماٌٍ <20>م كٌ<D983>خنامٍد حذ<D8AD> شنلد لشالم بزلٍد ن لشالم بخش<D8AE>ماٌٍ را <20>م لكٌ<D983>خنامٍد حذ<D8AD> شنلد بردارٍد. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
لنغ حذ<D8AD> را التخاب <20>لٍد:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
بخش<EFBFBD>ماٌٍ را <20>م كٌ<D983>خنامٍد حذ<D8AD> شنلد التخاب <20>لٍد:
|
||||
# ^UnComponentsSubText2
|
||||
ٍا<EFBFBD> بخش<D8AE>ماٌ اختٍارٌ را <20>م كٌ<D983>خنامٍد حذ<D8AD> شنلد التخاب <20>لٍد:
|
||||
# ^DirText
|
||||
برلاكم لصب<D8B5> $(^NameDA) را در <20>نشم زٍر لصب خنامد <20>رد. براٌ لصب در <20>نشم دٍ<D8AF>ر رنٌ د<>كم كرنر <20>فٍ<D981> <20>لٍد ن <20>نشم دٍ<D8AF>رٌ التخاب <20>لٍد. $_CLICK
|
||||
# ^DirSubText
|
||||
<EFBFBD>نشم ك<>صد
|
||||
# ^DirBrowseText
|
||||
التخاب <20>نشم براٌ لصب $(^NameDA):
|
||||
# ^UnDirText
|
||||
برلاكم لصب<D8B5> $(^NameDA) را از <20>نشم زٍر حذ<D8AD> خنامد <20>رد. براٌ لصب در <20>نشم دٍ<D8AF>ر رنٌ د<>كم كرنر <20>فٍ<D981> <20>لٍد ن <20>نشم دٍ<D8AF>رٌ التخاب <20>لٍد. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
التخاب <20>نشم براٌ حذ<D8AD> $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"<22>ضاٌ كنجند: "
|
||||
# ^SpaceRequired
|
||||
"<22>ضاٌ كنرد لٍاز: "
|
||||
# ^UninstallingText
|
||||
<EFBFBD>(^NameDA) از <20>نشم زٍر حذ<D8AD> خنامد شد. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
حذ<EFBFBD> از:
|
||||
# ^FileError
|
||||
خظا مل<D985>اك باز <20>ردل <20>رنلدم براٌ لنشتل: \r\n\r\n$0\r\n\n براٌ تن<D8AA><D986> لصب رنٌ Abort \r\n براٌ تفاش كجدد رنٌ Retry \r\n ن براٌ صر<D8B5><D8B1>لعر از اٍل <20>رنلدم رنٌ Ignore <20>فٍ<D981> <20>لٍد.
|
||||
# ^FileError_NoIgnore
|
||||
خظا مل<D985>اك باز <20>ردل <20>رنلدم براٌ لنشتل: \r\n\r\n$0\r\n\nبراٌ تفاش كجدد رنٌ Retry\r\nن براٌ الصرا<D8B1> رنٌ Cancel <20>فٍ<D981> <20>لٍد.
|
||||
# ^CantWrite
|
||||
"لنشتل كك<D983>ل لٍست: "
|
||||
# ^CopyFailed
|
||||
لسخم<EFBFBD>بردارٌ لاكن<D983><D986> بند.
|
||||
# ^CopyTo
|
||||
"لسخم<D8AE>بردارٌ در: "
|
||||
# ^Registering
|
||||
"در حاف ثبت: "
|
||||
# ^Unregistering
|
||||
"در حاف حذ<D8AD> ثبت: "
|
||||
# ^SymbolNotFound
|
||||
"غفاكت <20>ٍدا لشد: "
|
||||
# ^CouldNotLoad
|
||||
"بار<D8A7>ذارٌ كك<D983>ل لٍست: "
|
||||
# ^CreateFolder
|
||||
"اٍجاد <20>نشم: "
|
||||
# ^CreateShortcut
|
||||
"اٍجاد كٍال<D8A7>ب<EFBFBD>ر: "
|
||||
# ^CreatedUninstaller
|
||||
"حذ<D8AD><D8B0><EFBFBD>للدم اٍجاد شد: "
|
||||
# ^Delete
|
||||
"حذ<D8AD> <20>رنلدم: "
|
||||
# ^DeleteOnReboot
|
||||
"حذ<D8AD> مل<D985>اك رام الدازٌ كجدد: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"خظا مل<D985>اك اٍجاد كٍال<D8A7>ب<EFBFBD>ر: "
|
||||
# ^ErrorCreating
|
||||
"خظا مل<D985>اك اٍجاد: "
|
||||
# ^ErrorDecompressing
|
||||
خظا مل<D985>اك باز <20>ردل اظفاغات! لصب<D8B5><D8A8>للدم خراب است؟
|
||||
# ^ErrorRegistering
|
||||
خظا مل<D985>اك ثبت DLL
|
||||
# ^ExecShell
|
||||
"<22>نستم اجراٌٍ: "
|
||||
# ^Exec
|
||||
"اجرا: "
|
||||
# ^Extract
|
||||
"استخراج: "
|
||||
# ^ErrorWriting
|
||||
"استخراج: خظا مل<D985>اك لنشتل در <20>رنلدم"
|
||||
# ^InvalidOpcode
|
||||
لصب<EFBFBD><EFBFBD>للدم خراب است: <20>د غكفٍاتٌ لاكغتبر.
|
||||
# ^NoOLE
|
||||
"<22>OLE نجند لدارد: "
|
||||
# ^OutputFolder
|
||||
"<22>نشم خرنجٌ: "
|
||||
# ^RemoveFolder
|
||||
"حذ<D8AD> <20>نشم: "
|
||||
# ^RenameOnReboot
|
||||
"ت<>ٍٍر لاك مل<D985>اك رام الدازٌ كجدد: "
|
||||
# ^Rename
|
||||
"ت<>ٍٍر لاك: "
|
||||
# ^Skipped
|
||||
"<22>شك <20>نشٌ شد: "
|
||||
# ^CopyDetails
|
||||
لسخم<EFBFBD>بردارٌ جزئٍات در <20>فٍ<D981><D98D>برد
|
||||
# ^LogInstall
|
||||
ثبت رنلد لصب
|
||||
# ^Byte
|
||||
باٍت
|
||||
# ^Kilo
|
||||
<20>ٍفن
|
||||
# ^Mega
|
||||
ك<>ا
|
||||
# ^Giga
|
||||
<20>ٍ<EFBFBD>ا
|
||||
# Header, don't edit
|
||||
NLF v6
|
||||
# Start editing here
|
||||
# Language ID
|
||||
1065
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1256
|
||||
# RTL - anything else than RTL means LTR
|
||||
RTL
|
||||
# Translation By FzerorubigD - FzerorubigD@gmail.com - Thanx to all people help me in forum.persiantools.com, Elnaz Sarbar <elnaz@farsiweb.info>
|
||||
# ^Branding
|
||||
سٍستك لصب لاف<D8A7>سا<D8B3>ت %s
|
||||
# ^SetupCaption
|
||||
لصب $(^Name)
|
||||
# ^UninstallCaption
|
||||
حذ<EFBFBD> $(^Name)
|
||||
# ^LicenseSubCaption
|
||||
: كجنز لصب
|
||||
# ^ComponentsSubCaption
|
||||
: <20>زٍلم<D984>ماٌ لصب
|
||||
# ^DirSubCaption
|
||||
: <20>نشم لصب
|
||||
# ^InstallingSubCaption
|
||||
: در حاف لصب
|
||||
# ^CompletedSubCaption
|
||||
: <20>اٍال ٍا<D98D>ت
|
||||
# ^UnComponentsSubCaption
|
||||
: <20>زٍلم<D984>ماٌ حذ<D8AD>
|
||||
# ^UnDirSubCaption
|
||||
: <20>نشم حذ<D8AD>
|
||||
# ^ConfirmSubCaption
|
||||
: تأٍٍد
|
||||
# ^UninstallingSubCaption
|
||||
: در حاف حذ<D8AD>
|
||||
# ^UnCompletedSubCaption
|
||||
: <20>اٍال ٍا<D98D>ت
|
||||
# ^BackBtn
|
||||
&<26>بف
|
||||
# ^NextBtn
|
||||
&بغد
|
||||
# ^AgreeBtn
|
||||
&كنا<D986><D8A7>ك
|
||||
# ^AcceptBtn
|
||||
كل مكم بلدماٌ كجنز را <20>بنف &دارك
|
||||
# ^DontAcceptBtn
|
||||
كل بلدماٌ كجنز را <20>بنف &لدارك
|
||||
# ^InstallBtn
|
||||
&لصب
|
||||
# ^UninstallBtn
|
||||
&حذ<D8AD>
|
||||
# ^CancelBtn
|
||||
الصرا<EFBFBD>
|
||||
# ^CloseBtn
|
||||
&بستل
|
||||
# ^BrowseBtn
|
||||
&كرنر...
|
||||
# ^ShowDetailsBtn
|
||||
لكاٍش جزئٍات
|
||||
# ^ClickNext
|
||||
براٌ اداكم رنٌ د<>كم بغد <20>فٍ<D981> <20>لٍد.
|
||||
# ^ClickInstall
|
||||
براٌ شرنغ لصب رنٌ د<>كم لصب <20>فٍ<D981> <20>لٍد.
|
||||
# ^ClickUninstall
|
||||
براٌ شرنغ حذ<D8AD> رنٌ د<>كم حذ<D8AD> <20>فٍ<D981> <20>لٍد.
|
||||
# ^Name
|
||||
لاك
|
||||
# ^Completed
|
||||
<EFBFBD>اٍال ٍا<D98D>ت
|
||||
# ^LicenseText
|
||||
فظ<EFBFBD>اِ <20>بف از لصب $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ د<>كم كنا<D986><D8A7>ك <20>فٍ<D981> <20>لٍد.
|
||||
# ^LicenseTextCB
|
||||
فظ<EFBFBD>اِ <20>بف از لصب $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ جغبم لشالم<D984>زلٌ زٍر <20>فٍ<D981> <20>لٍد. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
فظ<EFBFBD>اِ <20>بف از لصب $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد <20>زٍلم انف را التخاب <20>لٍد. $_CLICK
|
||||
# ^UnLicenseText
|
||||
فظ<EFBFBD>اِ <20>بف از حذ<D8AD> $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ د<>كم كنا<D986><D8A7>ك <20>فٍ<D981> <20>لٍد.
|
||||
# ^UnLicenseTextCB
|
||||
فظ<EFBFBD>اِ <20>بف از حذ<D8AD> $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد رنٌ جغبم لشالم<D984>زلٌ زٍر <20>فٍ<D981> <20>لٍد. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
فظ<EFBFBD>اِ <20>بف از حذ<D8AD> $(^NameDA) كتل كجنز را بخنالٍد. ا<>ر مكم بلدماٌ آل را <20>بنف دارٍد <20>زٍلم انف را التخاب <20>لٍد. $_CLICK
|
||||
# ^Custom
|
||||
س<EFBFBD>ارشٌ
|
||||
# ^ComponentsText
|
||||
<EFBFBD>لار بخش<D8AE>ماٌٍ <20>م كٌ<D983>خنامٍد لصب شنلد لشالم بزلٍد ن لشالم بخش<D8AE>ماٌٍ را <20>م لكٌ<D983>خنامٍد لصب شنلد بردارٍد. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
لنغ لصب را كشخص <20>لٍد:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
بخش<EFBFBD>ماٌٍ را <20>م كٌ<D983>خنامٍد لصب شنلد التخاب <20>لٍد:
|
||||
# ^ComponentsSubText2
|
||||
ٍا<EFBFBD> بخش<D8AE>ماٌ اختٍارٌ را <20>م كٌ<D983>خنامٍد لصب شنلد التخاب <20>لٍد:
|
||||
# ^UnComponentsText
|
||||
<EFBFBD>لار بخش<D8AE>ماٌٍ <20>م كٌ<D983>خنامٍد حذ<D8AD> شنلد لشالم بزلٍد ن لشالم بخش<D8AE>ماٌٍ را <20>م لكٌ<D983>خنامٍد حذ<D8AD> شنلد بردارٍد. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
لنغ حذ<D8AD> را التخاب <20>لٍد:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
بخش<EFBFBD>ماٌٍ را <20>م كٌ<D983>خنامٍد حذ<D8AD> شنلد التخاب <20>لٍد:
|
||||
# ^UnComponentsSubText2
|
||||
ٍا<EFBFBD> بخش<D8AE>ماٌ اختٍارٌ را <20>م كٌ<D983>خنامٍد حذ<D8AD> شنلد التخاب <20>لٍد:
|
||||
# ^DirText
|
||||
برلاكم لصب<D8B5> $(^NameDA) را در <20>نشم زٍر لصب خنامد <20>رد. براٌ لصب در <20>نشم دٍ<D8AF>ر رنٌ د<>كم كرنر <20>فٍ<D981> <20>لٍد ن <20>نشم دٍ<D8AF>رٌ التخاب <20>لٍد. $_CLICK
|
||||
# ^DirSubText
|
||||
<EFBFBD>نشم ك<>صد
|
||||
# ^DirBrowseText
|
||||
التخاب <20>نشم براٌ لصب $(^NameDA):
|
||||
# ^UnDirText
|
||||
برلاكم لصب<D8B5> $(^NameDA) را از <20>نشم زٍر حذ<D8AD> خنامد <20>رد. براٌ لصب در <20>نشم دٍ<D8AF>ر رنٌ د<>كم كرنر <20>فٍ<D981> <20>لٍد ن <20>نشم دٍ<D8AF>رٌ التخاب <20>لٍد. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
التخاب <20>نشم براٌ حذ<D8AD> $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"<22>ضاٌ كنجند: "
|
||||
# ^SpaceRequired
|
||||
"<22>ضاٌ كنرد لٍاز: "
|
||||
# ^UninstallingText
|
||||
<EFBFBD>(^NameDA) از <20>نشم زٍر حذ<D8AD> خنامد شد. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
حذ<EFBFBD> از:
|
||||
# ^FileError
|
||||
خظا مل<D985>اك باز <20>ردل <20>رنلدم براٌ لنشتل: \r\n\r\n$0\r\n\n براٌ تن<D8AA><D986> لصب رنٌ Abort \r\n براٌ تفاش كجدد رنٌ Retry \r\n ن براٌ صر<D8B5><D8B1>لعر از اٍل <20>رنلدم رنٌ Ignore <20>فٍ<D981> <20>لٍد.
|
||||
# ^FileError_NoIgnore
|
||||
خظا مل<D985>اك باز <20>ردل <20>رنلدم براٌ لنشتل: \r\n\r\n$0\r\n\nبراٌ تفاش كجدد رنٌ Retry\r\nن براٌ الصرا<D8B1> رنٌ Cancel <20>فٍ<D981> <20>لٍد.
|
||||
# ^CantWrite
|
||||
"لنشتل كك<D983>ل لٍست: "
|
||||
# ^CopyFailed
|
||||
لسخم<EFBFBD>بردارٌ لاكن<D983><D986> بند.
|
||||
# ^CopyTo
|
||||
"لسخم<D8AE>بردارٌ در: "
|
||||
# ^Registering
|
||||
"در حاف ثبت: "
|
||||
# ^Unregistering
|
||||
"در حاف حذ<D8AD> ثبت: "
|
||||
# ^SymbolNotFound
|
||||
"غفاكت <20>ٍدا لشد: "
|
||||
# ^CouldNotLoad
|
||||
"بار<D8A7>ذارٌ كك<D983>ل لٍست: "
|
||||
# ^CreateFolder
|
||||
"اٍجاد <20>نشم: "
|
||||
# ^CreateShortcut
|
||||
"اٍجاد كٍال<D8A7>ب<EFBFBD>ر: "
|
||||
# ^CreatedUninstaller
|
||||
"حذ<D8AD><D8B0><EFBFBD>للدم اٍجاد شد: "
|
||||
# ^Delete
|
||||
"حذ<D8AD> <20>رنلدم: "
|
||||
# ^DeleteOnReboot
|
||||
"حذ<D8AD> مل<D985>اك رام الدازٌ كجدد: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"خظا مل<D985>اك اٍجاد كٍال<D8A7>ب<EFBFBD>ر: "
|
||||
# ^ErrorCreating
|
||||
"خظا مل<D985>اك اٍجاد: "
|
||||
# ^ErrorDecompressing
|
||||
خظا مل<D985>اك باز <20>ردل اظفاغات! لصب<D8B5><D8A8>للدم خراب است؟
|
||||
# ^ErrorRegistering
|
||||
خظا مل<D985>اك ثبت DLL
|
||||
# ^ExecShell
|
||||
"<22>نستم اجراٌٍ: "
|
||||
# ^Exec
|
||||
"اجرا: "
|
||||
# ^Extract
|
||||
"استخراج: "
|
||||
# ^ErrorWriting
|
||||
"استخراج: خظا مل<D985>اك لنشتل در <20>رنلدم"
|
||||
# ^InvalidOpcode
|
||||
لصب<EFBFBD><EFBFBD>للدم خراب است: <20>د غكفٍاتٌ لاكغتبر.
|
||||
# ^NoOLE
|
||||
"<22>OLE نجند لدارد: "
|
||||
# ^OutputFolder
|
||||
"<22>نشم خرنجٌ: "
|
||||
# ^RemoveFolder
|
||||
"حذ<D8AD> <20>نشم: "
|
||||
# ^RenameOnReboot
|
||||
"ت<>ٍٍر لاك مل<D985>اك رام الدازٌ كجدد: "
|
||||
# ^Rename
|
||||
"ت<>ٍٍر لاك: "
|
||||
# ^Skipped
|
||||
"<22>شك <20>نشٌ شد: "
|
||||
# ^CopyDetails
|
||||
لسخم<EFBFBD>بردارٌ جزئٍات در <20>فٍ<D981><D98D>برد
|
||||
# ^LogInstall
|
||||
ثبت رنلد لصب
|
||||
# ^Byte
|
||||
باٍت
|
||||
# ^Kilo
|
||||
<20>ٍفن
|
||||
# ^Mega
|
||||
ك<>ا
|
||||
# ^Giga
|
||||
<20>ٍ<EFBFBD>ا
|
||||
|
|
|
|||
|
|
@ -1,190 +1,190 @@
|
|||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
1041
|
||||
# Font and size - dash (-) means default
|
||||
MS Pゴシック
|
||||
9
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
932
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by Dnanako, updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
$(^Name) セットアップ
|
||||
# ^UninstallCaption
|
||||
$(^Name) アンインストール
|
||||
# ^LicenseSubCaption
|
||||
:ライセンス契約書
|
||||
# ^ComponentsSubCaption
|
||||
:インストール オプション
|
||||
# ^DirSubCaption
|
||||
:インストール フォルダ
|
||||
# ^InstallingSubCaption
|
||||
:インストール
|
||||
# ^CompletedSubCaption
|
||||
:完了
|
||||
# ^UnComponentsSubCaption
|
||||
: アンインストール オプション
|
||||
# ^UnDirSubCaption
|
||||
: アンインストール フォルダ
|
||||
# ^ComfirmSubCaption
|
||||
:確認
|
||||
# ^UninstallingSubCaption
|
||||
:アンインストール
|
||||
# ^UnCompletedSubCaption
|
||||
:完了
|
||||
# ^BackBtn
|
||||
< 戻る(&B)
|
||||
# ^NextBtn
|
||||
次へ(&N) >
|
||||
# ^AgreeBtn
|
||||
同意する(&A)
|
||||
# ^AcceptBtn
|
||||
このライセンス契約書に同意します(&A)
|
||||
# ^DontAcceptBtn
|
||||
このライセンス契約書には同意できません(&D)
|
||||
# ^InstallBtn
|
||||
インストール
|
||||
# ^UninstallBtn
|
||||
アンインストール(&U)
|
||||
# ^CancelBtn
|
||||
キャンセル
|
||||
# ^CloseBtn
|
||||
閉じる(&C)
|
||||
# ^BrowseBtn
|
||||
参照(&R)...
|
||||
# ^ShowDetailsBtn
|
||||
詳細を表示(&D)
|
||||
# ^ClickNext
|
||||
続けるには [次へ] をクリックして下さい。
|
||||
# ^ClickInstall
|
||||
インストールを始めるには [インストール] をクリックして下さい。
|
||||
# ^ClickUninstall
|
||||
アンインストールを始めるには [アンインストール] をクリックして下さい。
|
||||
# ^Name
|
||||
アプリケーション
|
||||
# ^Completed
|
||||
完了
|
||||
# ^LicenseText
|
||||
$(^NameDA)をインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、[同意する] ボタンをクリックして下さい。
|
||||
# ^LicenseTextCB
|
||||
$(^NameDA)をインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下のチェックボックスをクリックして下さい。 $_CLICK
|
||||
# ^LicenseTextRB
|
||||
$(^NameDA)をインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。 $_CLICK
|
||||
# ^UnLicenseText
|
||||
$(^NameDA)をアンインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、[同意する] ボタンをクリックして下さい。
|
||||
# ^UnLicenseTextCB
|
||||
$(^NameDA)をアンインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下のチェックボックスをクリックして下さい。 $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
$(^NameDA)をアンインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。 $_CLICK
|
||||
# ^Custom
|
||||
カスタム
|
||||
# ^ComponentsText
|
||||
インストールしたいコンポーネントにチェックを付けて下さい。不要なものについては、チェックを外して下さい。 $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
インストール タイプを選択:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
インストール コンポーネントを選択:
|
||||
# ^ComponentsSubText2
|
||||
または、インストール オプション コンポーネントを選択:
|
||||
# ^UnComponentsText
|
||||
アンインストールしたいコンポーネントにチェックを付けて下さい。そうでないものについては、チェックを外して下さい。 $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
アンインストール タイプを選択:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
アンインストール コンポーネントを選択:
|
||||
# ^UnComponentsSubText2
|
||||
または、アンインストール オプション コンポーネントを選択:
|
||||
# ^DirText
|
||||
$(^NameDA)を以下のフォルダにインストールします。異なったフォルダにインストールするには、[参照] を押して、別のフォルダを選択してください。 $_CLICK
|
||||
# ^DirSubText
|
||||
インストール先 フォルダ
|
||||
# ^DirBrowseText
|
||||
$(^NameDA)をインストールするフォルダを選択してください:
|
||||
# ^UnDirText
|
||||
$(^NameDA)を以下のフォルダからアンインストールします。異なったフォルダからアンインストールするには、[参照] を押して、別のフォルダを選択してください。 $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
$(^NameDA)をアンインストールするフォルダを選択してください:
|
||||
# ^SpaceAvailable
|
||||
利用可能なディスクスペース:
|
||||
# ^SpaceRequired
|
||||
必要なディスクスペース:
|
||||
# ^UninstallingText
|
||||
$(^NameDA)は、以下のフォルダからアンインストールされます。 $_CLICK
|
||||
# ^UninstallingSubText
|
||||
アンインストール元:
|
||||
# ^FileError
|
||||
初期ファイルの作成エラー:\r\n\t"$0"\r\nインストールを中止するには中止を,\r\n再びこのファイルの作成を試みるには再試行を, また\r\nこのファイルをスキップして続けるには無視を押してください
|
||||
# ^FileError_NoIgnore
|
||||
初期ファイルの作成エラー: \r\n\t"$0"\r\n再びこのファイルの作成を試みるには再試行を, また\r\nインストールを中止するにはキャンセルを押して下さい
|
||||
# ^CantWrite
|
||||
作成できません:
|
||||
# ^CopyFailed
|
||||
コピーは失敗しました
|
||||
# ^CopyTo
|
||||
コピーします
|
||||
# ^Registering
|
||||
登録中:
|
||||
# ^Unregistering
|
||||
登録解除中:
|
||||
# ^SymbolNotFound
|
||||
シンボルを見つけることができません:
|
||||
# ^CouldNotLoad
|
||||
ロードすることができません:
|
||||
# ^CreateFolder
|
||||
フォルダの作成:
|
||||
# ^CreateShortcut
|
||||
ショートカットの作成:
|
||||
# ^CreatedUninstaller
|
||||
アンインストーラの作成:
|
||||
# ^Delete
|
||||
ファイルの削除:
|
||||
# ^DeleteOnReboot
|
||||
リブート時に削除:
|
||||
# ^ErrorCreatingShortcut
|
||||
ショートカットの作成エラー:
|
||||
# ^ErrorCreating
|
||||
作成エラー:
|
||||
# ^ErrorDecompressing
|
||||
データの抽出エラー\r\n\r\nインストーラが破損しています。
|
||||
# ^ErrorRegistering
|
||||
DLLの登録エラー
|
||||
# ^ExecShell
|
||||
拡張子の関連付け実行:
|
||||
# ^Execute
|
||||
実行:
|
||||
# ^Extract
|
||||
抽出:
|
||||
# ^ErrorWriting
|
||||
抽出:ファイル作成エラー
|
||||
# ^InvalidOpcode
|
||||
インストールの不正:無効なopcode
|
||||
# ^NoOLE
|
||||
OLEがありません:
|
||||
# ^OutputFolder
|
||||
出力先フォルダ:
|
||||
# ^RemoveFolder
|
||||
フォルダの削除:
|
||||
# ^RenameOnReboot
|
||||
リブート時に名前の変更:
|
||||
# ^Rename
|
||||
名前の変更:
|
||||
# ^Skipped
|
||||
スキップ:
|
||||
# ^CopyDetails
|
||||
クリップボードへ詳細をコピー
|
||||
# ^LogInstall
|
||||
インストールプロセスをログヘ記録
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
K
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
1041
|
||||
# Font and size - dash (-) means default
|
||||
MS Pゴシック
|
||||
9
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
932
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by Dnanako, updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
$(^Name) セットアップ
|
||||
# ^UninstallCaption
|
||||
$(^Name) アンインストール
|
||||
# ^LicenseSubCaption
|
||||
:ライセンス契約書
|
||||
# ^ComponentsSubCaption
|
||||
:インストール オプション
|
||||
# ^DirSubCaption
|
||||
:インストール フォルダ
|
||||
# ^InstallingSubCaption
|
||||
:インストール
|
||||
# ^CompletedSubCaption
|
||||
:完了
|
||||
# ^UnComponentsSubCaption
|
||||
: アンインストール オプション
|
||||
# ^UnDirSubCaption
|
||||
: アンインストール フォルダ
|
||||
# ^ComfirmSubCaption
|
||||
:確認
|
||||
# ^UninstallingSubCaption
|
||||
:アンインストール
|
||||
# ^UnCompletedSubCaption
|
||||
:完了
|
||||
# ^BackBtn
|
||||
< 戻る(&B)
|
||||
# ^NextBtn
|
||||
次へ(&N) >
|
||||
# ^AgreeBtn
|
||||
同意する(&A)
|
||||
# ^AcceptBtn
|
||||
このライセンス契約書に同意します(&A)
|
||||
# ^DontAcceptBtn
|
||||
このライセンス契約書には同意できません(&D)
|
||||
# ^InstallBtn
|
||||
インストール
|
||||
# ^UninstallBtn
|
||||
アンインストール(&U)
|
||||
# ^CancelBtn
|
||||
キャンセル
|
||||
# ^CloseBtn
|
||||
閉じる(&C)
|
||||
# ^BrowseBtn
|
||||
参照(&R)...
|
||||
# ^ShowDetailsBtn
|
||||
詳細を表示(&D)
|
||||
# ^ClickNext
|
||||
続けるには [次へ] をクリックして下さい。
|
||||
# ^ClickInstall
|
||||
インストールを始めるには [インストール] をクリックして下さい。
|
||||
# ^ClickUninstall
|
||||
アンインストールを始めるには [アンインストール] をクリックして下さい。
|
||||
# ^Name
|
||||
アプリケーション
|
||||
# ^Completed
|
||||
完了
|
||||
# ^LicenseText
|
||||
$(^NameDA)をインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、[同意する] ボタンをクリックして下さい。
|
||||
# ^LicenseTextCB
|
||||
$(^NameDA)をインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下のチェックボックスをクリックして下さい。 $_CLICK
|
||||
# ^LicenseTextRB
|
||||
$(^NameDA)をインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。 $_CLICK
|
||||
# ^UnLicenseText
|
||||
$(^NameDA)をアンインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、[同意する] ボタンをクリックして下さい。
|
||||
# ^UnLicenseTextCB
|
||||
$(^NameDA)をアンインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下のチェックボックスをクリックして下さい。 $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
$(^NameDA)をアンインストールする前に、ライセンス契約書を確認して下さい。契約書の全ての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。 $_CLICK
|
||||
# ^Custom
|
||||
カスタム
|
||||
# ^ComponentsText
|
||||
インストールしたいコンポーネントにチェックを付けて下さい。不要なものについては、チェックを外して下さい。 $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
インストール タイプを選択:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
インストール コンポーネントを選択:
|
||||
# ^ComponentsSubText2
|
||||
または、インストール オプション コンポーネントを選択:
|
||||
# ^UnComponentsText
|
||||
アンインストールしたいコンポーネントにチェックを付けて下さい。そうでないものについては、チェックを外して下さい。 $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
アンインストール タイプを選択:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
アンインストール コンポーネントを選択:
|
||||
# ^UnComponentsSubText2
|
||||
または、アンインストール オプション コンポーネントを選択:
|
||||
# ^DirText
|
||||
$(^NameDA)を以下のフォルダにインストールします。異なったフォルダにインストールするには、[参照] を押して、別のフォルダを選択してください。 $_CLICK
|
||||
# ^DirSubText
|
||||
インストール先 フォルダ
|
||||
# ^DirBrowseText
|
||||
$(^NameDA)をインストールするフォルダを選択してください:
|
||||
# ^UnDirText
|
||||
$(^NameDA)を以下のフォルダからアンインストールします。異なったフォルダからアンインストールするには、[参照] を押して、別のフォルダを選択してください。 $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
$(^NameDA)をアンインストールするフォルダを選択してください:
|
||||
# ^SpaceAvailable
|
||||
利用可能なディスクスペース:
|
||||
# ^SpaceRequired
|
||||
必要なディスクスペース:
|
||||
# ^UninstallingText
|
||||
$(^NameDA)は、以下のフォルダからアンインストールされます。 $_CLICK
|
||||
# ^UninstallingSubText
|
||||
アンインストール元:
|
||||
# ^FileError
|
||||
初期ファイルの作成エラー:\r\n\t"$0"\r\nインストールを中止するには中止を,\r\n再びこのファイルの作成を試みるには再試行を, また\r\nこのファイルをスキップして続けるには無視を押してください
|
||||
# ^FileError_NoIgnore
|
||||
初期ファイルの作成エラー: \r\n\t"$0"\r\n再びこのファイルの作成を試みるには再試行を, また\r\nインストールを中止するにはキャンセルを押して下さい
|
||||
# ^CantWrite
|
||||
作成できません:
|
||||
# ^CopyFailed
|
||||
コピーは失敗しました
|
||||
# ^CopyTo
|
||||
コピーします
|
||||
# ^Registering
|
||||
登録中:
|
||||
# ^Unregistering
|
||||
登録解除中:
|
||||
# ^SymbolNotFound
|
||||
シンボルを見つけることができません:
|
||||
# ^CouldNotLoad
|
||||
ロードすることができません:
|
||||
# ^CreateFolder
|
||||
フォルダの作成:
|
||||
# ^CreateShortcut
|
||||
ショートカットの作成:
|
||||
# ^CreatedUninstaller
|
||||
アンインストーラの作成:
|
||||
# ^Delete
|
||||
ファイルの削除:
|
||||
# ^DeleteOnReboot
|
||||
リブート時に削除:
|
||||
# ^ErrorCreatingShortcut
|
||||
ショートカットの作成エラー:
|
||||
# ^ErrorCreating
|
||||
作成エラー:
|
||||
# ^ErrorDecompressing
|
||||
データの抽出エラー\r\n\r\nインストーラが破損しています。
|
||||
# ^ErrorRegistering
|
||||
DLLの登録エラー
|
||||
# ^ExecShell
|
||||
拡張子の関連付け実行:
|
||||
# ^Execute
|
||||
実行:
|
||||
# ^Extract
|
||||
抽出:
|
||||
# ^ErrorWriting
|
||||
抽出:ファイル作成エラー
|
||||
# ^InvalidOpcode
|
||||
インストールの不正:無効なopcode
|
||||
# ^NoOLE
|
||||
OLEがありません:
|
||||
# ^OutputFolder
|
||||
出力先フォルダ:
|
||||
# ^RemoveFolder
|
||||
フォルダの削除:
|
||||
# ^RenameOnReboot
|
||||
リブート時に名前の変更:
|
||||
# ^Rename
|
||||
名前の変更:
|
||||
# ^Skipped
|
||||
スキップ:
|
||||
# ^CopyDetails
|
||||
クリップボードへ詳細をコピー
|
||||
# ^LogInstall
|
||||
インストールプロセスをログヘ記録
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
K
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
G
|
||||
|
|
@ -1,122 +1,122 @@
|
|||
;Language: Japanese (1041)
|
||||
;By Dnanako
|
||||
;Translation updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
|
||||
|
||||
!insertmacro LANGFILE "Japanese" "Japanese"
|
||||
|
||||
!ifdef MUI_WELCOMEPAGE
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) セットアップ ウィザードへようこそ"
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "このウィザードは、$(^NameDA)のインストールをガイドしていきます。$\r$\n$\r$\nセットアップを開始する前に、他のすべてのアプリケーションを終了することを推奨します。これによってセットアップがコンピュータを再起動せずに、システム ファイルを更新することが出来るようになります。$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNWELCOMEPAGE
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) アンインストール ウィザードへようこそ"
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "このウィザードは、$(^NameDA)のアンインストールをガイドしていきます。$\r$\n$\r$\nアンインストールを開始する前に、$(^NameDA)が起動していないことを確認して下さい。$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
${LangFileString} MUI_TEXT_LICENSE_TITLE "ライセンス契約書"
|
||||
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)をインストールする前に、ライセンス条件を確認してください。"
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "契約書のすべての条件に同意するならば、[同意する] を選んでインストールを続けてください。$(^NameDA) をインストールするには、契約書に同意する必要があります。"
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "契約書のすべての条件に同意するならば、下のチェックボックスをクリックしてください。$(^NameDA) をインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "契約書のすべての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。$(^NameDA) をインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ライセンス契約書"
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)をアンインストールする前に、ライセンス条件を確認してください。"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "契約書のすべての条件に同意するならば、[同意する] を選んでアンインストールを続けてください。$(^NameDA) をアンインストールするには、契約書に同意する必要があります。"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "契約書のすべての条件に同意するならば、下のチェックボックスをクリックしてください。$(^NameDA) をアンインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "契約書のすべての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。$(^NameDA) をアンインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "[Page Down]を押して契約書をすべてお読みください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "コンポーネントを選んでください。"
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA)のインストール オプションを選んでください。"
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "説明"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCOMPONENTSPAGE
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "コンポーネントを選んでください。"
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)のアンインストール オプションを選んでください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
|
||||
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "コンポーネントの上にマウス カーソルを移動すると、ここに説明が表示されます。"
|
||||
!else
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "コンポーネントの上にマウス カーソルを移動すると、ここに説明が表示されます。"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "インストール先を選んでください。"
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)をインストールするフォルダを選んでください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNDIRECTORYSPAGE
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "アンインストール元を選んでください。"
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)をアンインストールするフォルダを選んでください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_INSTFILESPAGE
|
||||
${LangFileString} MUI_TEXT_INSTALLING_TITLE "インストール"
|
||||
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)をインストールしています。しばらくお待ちください。"
|
||||
${LangFileString} MUI_TEXT_FINISH_TITLE "インストールの完了"
|
||||
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "インストールに成功しました。"
|
||||
${LangFileString} MUI_TEXT_ABORT_TITLE "インストールの中止"
|
||||
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "セットアップは正常に完了されませんでした。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNINSTFILESPAGE
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "アンインストール"
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA)をアンインストールしています。しばらくお待ちください。"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_TITLE "アンインストールの完了"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "アンインストールに成功しました。"
|
||||
${LangFileString} MUI_UNTEXT_ABORT_TITLE "アンインストールの中止"
|
||||
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "アンインストールは正常に完了されませんでした。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) セットアップ ウィザードは完了しました。"
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)は、このコンピュータにインストールされました。$\r$\n$\r$\nウィザードを閉じるには [完了] を押してください。"
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) のインストールを完了するには、このコンピュータを再起動する必要があります。今すぐ再起動しますか?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) アンインストール ウィザードは完了しました。"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA)は、このコンピュータからアンインストールされました。$\r$\n$\r$\nウィザードを閉じるには [完了] を押してください。"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) のアンインストールを完了するには、このコンピュータを再起動する必要があります。今すぐ再起動しますか?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "今すぐ再起動する"
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "後で手動で再起動する"
|
||||
${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA)を実行(&R)"
|
||||
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Readme を表示する(&S)"
|
||||
${LangFileString} MUI_BUTTONTEXT_FINISH "完了(&F)"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_STARTMENUPAGE
|
||||
${LangFileString} MUI_TEXT_STARTMENU_TITLE "スタートメニュー フォルダを選んでください。"
|
||||
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "$(^NameDA)のショートカットを作成するスタートメニュー フォルダを選んで下さい。"
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "このプログラムのショートカットを作成したいスタートメニュー フォルダを選択してください。また、作成する新しいフォルダに名前をつけることもできます。"
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "ショートカットを作成しない"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCONFIRMPAGE
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)のアンインストール"
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA)をこのコンピュータから削除します。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_ABORTWARNING
|
||||
${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) セットアップを中止しますか?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNABORTWARNING
|
||||
${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) アンインストールを中止しますか?"
|
||||
!endif
|
||||
;Language: Japanese (1041)
|
||||
;By Dnanako
|
||||
;Translation updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
|
||||
|
||||
!insertmacro LANGFILE "Japanese" "Japanese"
|
||||
|
||||
!ifdef MUI_WELCOMEPAGE
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) セットアップ ウィザードへようこそ"
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "このウィザードは、$(^NameDA)のインストールをガイドしていきます。$\r$\n$\r$\nセットアップを開始する前に、他のすべてのアプリケーションを終了することを推奨します。これによってセットアップがコンピュータを再起動せずに、システム ファイルを更新することが出来るようになります。$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNWELCOMEPAGE
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) アンインストール ウィザードへようこそ"
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "このウィザードは、$(^NameDA)のアンインストールをガイドしていきます。$\r$\n$\r$\nアンインストールを開始する前に、$(^NameDA)が起動していないことを確認して下さい。$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
${LangFileString} MUI_TEXT_LICENSE_TITLE "ライセンス契約書"
|
||||
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)をインストールする前に、ライセンス条件を確認してください。"
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "契約書のすべての条件に同意するならば、[同意する] を選んでインストールを続けてください。$(^NameDA) をインストールするには、契約書に同意する必要があります。"
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "契約書のすべての条件に同意するならば、下のチェックボックスをクリックしてください。$(^NameDA) をインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "契約書のすべての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。$(^NameDA) をインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ライセンス契約書"
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)をアンインストールする前に、ライセンス条件を確認してください。"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "契約書のすべての条件に同意するならば、[同意する] を選んでアンインストールを続けてください。$(^NameDA) をアンインストールするには、契約書に同意する必要があります。"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "契約書のすべての条件に同意するならば、下のチェックボックスをクリックしてください。$(^NameDA) をアンインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "契約書のすべての条件に同意するならば、下に表示されているオプションのうち、最初のものを選んで下さい。$(^NameDA) をアンインストールするには、契約書に同意する必要があります。 $_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "[Page Down]を押して契約書をすべてお読みください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "コンポーネントを選んでください。"
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA)のインストール オプションを選んでください。"
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "説明"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCOMPONENTSPAGE
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "コンポーネントを選んでください。"
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)のアンインストール オプションを選んでください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
|
||||
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "コンポーネントの上にマウス カーソルを移動すると、ここに説明が表示されます。"
|
||||
!else
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "コンポーネントの上にマウス カーソルを移動すると、ここに説明が表示されます。"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "インストール先を選んでください。"
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)をインストールするフォルダを選んでください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNDIRECTORYSPAGE
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "アンインストール元を選んでください。"
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)をアンインストールするフォルダを選んでください。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_INSTFILESPAGE
|
||||
${LangFileString} MUI_TEXT_INSTALLING_TITLE "インストール"
|
||||
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)をインストールしています。しばらくお待ちください。"
|
||||
${LangFileString} MUI_TEXT_FINISH_TITLE "インストールの完了"
|
||||
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "インストールに成功しました。"
|
||||
${LangFileString} MUI_TEXT_ABORT_TITLE "インストールの中止"
|
||||
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "セットアップは正常に完了されませんでした。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNINSTFILESPAGE
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "アンインストール"
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA)をアンインストールしています。しばらくお待ちください。"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_TITLE "アンインストールの完了"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "アンインストールに成功しました。"
|
||||
${LangFileString} MUI_UNTEXT_ABORT_TITLE "アンインストールの中止"
|
||||
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "アンインストールは正常に完了されませんでした。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) セットアップ ウィザードは完了しました。"
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)は、このコンピュータにインストールされました。$\r$\n$\r$\nウィザードを閉じるには [完了] を押してください。"
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) のインストールを完了するには、このコンピュータを再起動する必要があります。今すぐ再起動しますか?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) アンインストール ウィザードは完了しました。"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA)は、このコンピュータからアンインストールされました。$\r$\n$\r$\nウィザードを閉じるには [完了] を押してください。"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) のアンインストールを完了するには、このコンピュータを再起動する必要があります。今すぐ再起動しますか?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "今すぐ再起動する"
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "後で手動で再起動する"
|
||||
${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA)を実行(&R)"
|
||||
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Readme を表示する(&S)"
|
||||
${LangFileString} MUI_BUTTONTEXT_FINISH "完了(&F)"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_STARTMENUPAGE
|
||||
${LangFileString} MUI_TEXT_STARTMENU_TITLE "スタートメニュー フォルダを選んでください。"
|
||||
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "$(^NameDA)のショートカットを作成するスタートメニュー フォルダを選んで下さい。"
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "このプログラムのショートカットを作成したいスタートメニュー フォルダを選択してください。また、作成する新しいフォルダに名前をつけることもできます。"
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "ショートカットを作成しない"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCONFIRMPAGE
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)のアンインストール"
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA)をこのコンピュータから削除します。"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_ABORTWARNING
|
||||
${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) セットアップを中止しますか?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNABORTWARNING
|
||||
${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) アンインストールを中止しますか?"
|
||||
!endif
|
||||
|
|
|
|||
|
|
@ -1,190 +1,190 @@
|
|||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
3098
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1251
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by Срђан Обућина <obucina@srpskijezik.edu.yu>
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
$(^Name) Инсталација
|
||||
# ^UninstallCaption
|
||||
$(^Name) Деинсталација
|
||||
# ^LicenseSubCaption
|
||||
: Договор о праву коришћења
|
||||
# ^ComponentsSubCaption
|
||||
: Опције инсталације
|
||||
# ^DirSubCaption
|
||||
: Избор фолдера за инсталацију
|
||||
# ^InstallingSubCaption
|
||||
: Инсталација
|
||||
# ^CompletedSubCaption
|
||||
: Завршена инсталација
|
||||
# ^UnComponentsSubCaption
|
||||
: Опције деинсталације
|
||||
# ^UnDirSubCaption
|
||||
: Избор фолдера за деинсталацију
|
||||
# ^ConfirmSubCaption
|
||||
: Потврђивање
|
||||
# ^UninstallingSubCaption
|
||||
: Деинсталација
|
||||
# ^UnCompletedSubCaption
|
||||
: Завршена деинсталација
|
||||
# ^BackBtn
|
||||
< Назад
|
||||
# ^NextBtn
|
||||
Напред >
|
||||
# ^AgreeBtn
|
||||
Прихватам
|
||||
# ^AcceptBtn
|
||||
Прихватам услове договора о праву коришћења
|
||||
# ^DontAcceptBtn
|
||||
Не прихватам услове договора о праву коришћења
|
||||
# ^InstallBtn
|
||||
Инсталирај
|
||||
# ^UninstallBtn
|
||||
Деинсталирај
|
||||
# ^CancelBtn
|
||||
Одустани
|
||||
# ^CloseBtn
|
||||
Затвори
|
||||
# ^BrowseBtn
|
||||
Избор...
|
||||
# ^ShowDetailsBtn
|
||||
Детаљи
|
||||
# ^ClickNext
|
||||
Притисните дугме „Напред“ за наставак.
|
||||
# ^ClickInstall
|
||||
Притисните дугме „Инсталирај“ за почетак инсталације.
|
||||
# ^ClickUninstall
|
||||
Притисните дугме „Деинсталирај“ за почетак деинсталације.
|
||||
# ^Name
|
||||
Име
|
||||
# ^Completed
|
||||
Завршено
|
||||
# ^LicenseText
|
||||
Пажљиво прочитајте договор о праву коришћења пре инсталације програма $(^NameDA). Ако прихватате све услове договора, притисните дугме „Прихватам“.
|
||||
# ^LicenseTextCB
|
||||
Пажљиво прочитајте договор о праву коришћења пре инсталације програма $(^NameDA). Ако прихватате све услове договора, обележите квадратић испод. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Пажљиво прочитајте договор о праву коришћења пре инсталације програма $(^NameDA). Ако прихватате све услове договора, изаберите прву опцију испод. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Пажљиво прочитајте договор о праву коришћења пре деинсталације програма $(^NameDA). Ако прихватате све услове договора, притисните дугме „Прихватам“.
|
||||
# ^UnLicenseTextCB
|
||||
Пажљиво прочитајте договор о праву коришћења пре деинсталације програма $(^NameDA). Ако прихватате све услове договора, обележите квадратић испод. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Пажљиво прочитајте договор о праву коришћења пре деинсталације програма $(^NameDA). Ако прихватате све услове договора, изаберите прву опцију испод. $_CLICK
|
||||
# ^Custom
|
||||
Прилагођавање
|
||||
# ^ComponentsText
|
||||
Изаберите компоненте за инсталацију. Инсталирају се само означене компоненте. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Изаберите тип инсталације:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Изаберите компоненте за инсталацију:
|
||||
# ^ComponentsSubText2
|
||||
Или, изаберите опционе компоненте које желите да инсталирате:
|
||||
# ^UnComponentsText
|
||||
Изаберите компоненте за деинсталацију. Деинсталирају се само означене компоненте. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Изаберите тип деинсталације:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Изаберите компоненте за деинсталацију:
|
||||
# ^UnComponentsSubText2
|
||||
Или, изаберите опционе компоненте које желите да деинсталирате:
|
||||
# ^DirText
|
||||
Програм $(^NameDA) ће бити инсталиран у наведени фолдер. За инсталацију у други фолдер притисните дугме „Избор...“ и изаберите фолдер. $_CLICK
|
||||
# ^DirSubText
|
||||
Фолдер
|
||||
# ^DirBrowseText
|
||||
Изаберите фолдер у који ћете инсталирати програм $(^NameDA):
|
||||
# ^UnDirText
|
||||
Програм $(^NameDA) ће бити деинсталиран из наведеног фолдера. За деинсталацију из другог фолдера притисните дугме „Избор...“ и изаберите фолдер. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Изаберите фолдер из кога ћете деинсталирати програм $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"Слободан простор: "
|
||||
# ^SpaceRequired
|
||||
"Потребан простор: "
|
||||
# ^UninstallingText
|
||||
Програм $(^NameDA) ће бити деинсталиран из наведеног фолдера. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Деинсталација из:
|
||||
# ^FileError
|
||||
Грешка при отварању фајла за писање: \r\n\t"$0"\r\nПритисните дугме „Одустани“ за прекид инсталације,\r\n„Понови“ за поновни покушај писања у фајл, или\r\n„Игнориши“ за прескакање овог фајла.
|
||||
# ^FileError_NoIgnore
|
||||
Грешка при отварању фајла за писање: \r\n\t"$0"\r\nПритисните дугме „Понови“ за поновни покушај писања у фајл, или\r\n„Одустани“ за прекид инсталирања.
|
||||
# ^CantWrite
|
||||
"Немогуће писање: "
|
||||
# ^CopyFailed
|
||||
Неуспешно копирање
|
||||
# ^CopyTo
|
||||
"Копирање у "
|
||||
# ^Registering
|
||||
"Регистровање: "
|
||||
# ^Unregistering
|
||||
"Дерегистровање: "
|
||||
# ^SymbolNotFound
|
||||
"Симбол није нађен: "
|
||||
# ^CouldNotLoad
|
||||
"Немогуће учитавање: "
|
||||
# ^CreateFolder
|
||||
"Креирање фолдера: "
|
||||
# ^CreateShortcut
|
||||
"Креирање пречице: "
|
||||
# ^CreatedUninstaller
|
||||
"Креирање деинсталера: "
|
||||
# ^Delete
|
||||
"Брисање фајла: "
|
||||
# ^DeleteOnReboot
|
||||
"Брисање при рестарту: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Грешка при креирању пречице: "
|
||||
# ^ErrorCreating
|
||||
"Грешка при креирању: "
|
||||
# ^ErrorDecompressing
|
||||
Грешка при отпакивању података! Оштећен инсталациони програм?
|
||||
# ^ErrorRegistering
|
||||
Грешка при регистровању библиотеке
|
||||
# ^ExecShell
|
||||
"Извршавање у окружењу: "
|
||||
# ^Exec
|
||||
"Извршавање: "
|
||||
# ^Extract
|
||||
"Отпакивање: "
|
||||
# ^ErrorWriting
|
||||
"Отпакивање: грешка при упису у фајл "
|
||||
# ^InvalidOpcode
|
||||
Оштећен инсталациони програм: неисправна команда
|
||||
# ^NoOLE
|
||||
"Нема OLE подршке за: "
|
||||
# ^OutputFolder
|
||||
"Излазни фолдер: "
|
||||
# ^RemoveFolder
|
||||
"Брисање фолдера: "
|
||||
# ^RenameOnReboot
|
||||
"Преименовање при рестартовању: "
|
||||
# ^Rename
|
||||
"Преименован: "
|
||||
# ^Skipped
|
||||
"Прескочен: "
|
||||
# ^CopyDetails
|
||||
Копирај детаље у клипборд
|
||||
# ^LogInstall
|
||||
Води записник о процесу инсталације
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
k
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
3098
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1251
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by Срђан Обућина <obucina@srpskijezik.edu.yu>
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
$(^Name) Инсталација
|
||||
# ^UninstallCaption
|
||||
$(^Name) Деинсталација
|
||||
# ^LicenseSubCaption
|
||||
: Договор о праву коришћења
|
||||
# ^ComponentsSubCaption
|
||||
: Опције инсталације
|
||||
# ^DirSubCaption
|
||||
: Избор фолдера за инсталацију
|
||||
# ^InstallingSubCaption
|
||||
: Инсталација
|
||||
# ^CompletedSubCaption
|
||||
: Завршена инсталација
|
||||
# ^UnComponentsSubCaption
|
||||
: Опције деинсталације
|
||||
# ^UnDirSubCaption
|
||||
: Избор фолдера за деинсталацију
|
||||
# ^ConfirmSubCaption
|
||||
: Потврђивање
|
||||
# ^UninstallingSubCaption
|
||||
: Деинсталација
|
||||
# ^UnCompletedSubCaption
|
||||
: Завршена деинсталација
|
||||
# ^BackBtn
|
||||
< Назад
|
||||
# ^NextBtn
|
||||
Напред >
|
||||
# ^AgreeBtn
|
||||
Прихватам
|
||||
# ^AcceptBtn
|
||||
Прихватам услове договора о праву коришћења
|
||||
# ^DontAcceptBtn
|
||||
Не прихватам услове договора о праву коришћења
|
||||
# ^InstallBtn
|
||||
Инсталирај
|
||||
# ^UninstallBtn
|
||||
Деинсталирај
|
||||
# ^CancelBtn
|
||||
Одустани
|
||||
# ^CloseBtn
|
||||
Затвори
|
||||
# ^BrowseBtn
|
||||
Избор...
|
||||
# ^ShowDetailsBtn
|
||||
Детаљи
|
||||
# ^ClickNext
|
||||
Притисните дугме „Напред“ за наставак.
|
||||
# ^ClickInstall
|
||||
Притисните дугме „Инсталирај“ за почетак инсталације.
|
||||
# ^ClickUninstall
|
||||
Притисните дугме „Деинсталирај“ за почетак деинсталације.
|
||||
# ^Name
|
||||
Име
|
||||
# ^Completed
|
||||
Завршено
|
||||
# ^LicenseText
|
||||
Пажљиво прочитајте договор о праву коришћења пре инсталације програма $(^NameDA). Ако прихватате све услове договора, притисните дугме „Прихватам“.
|
||||
# ^LicenseTextCB
|
||||
Пажљиво прочитајте договор о праву коришћења пре инсталације програма $(^NameDA). Ако прихватате све услове договора, обележите квадратић испод. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Пажљиво прочитајте договор о праву коришћења пре инсталације програма $(^NameDA). Ако прихватате све услове договора, изаберите прву опцију испод. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Пажљиво прочитајте договор о праву коришћења пре деинсталације програма $(^NameDA). Ако прихватате све услове договора, притисните дугме „Прихватам“.
|
||||
# ^UnLicenseTextCB
|
||||
Пажљиво прочитајте договор о праву коришћења пре деинсталације програма $(^NameDA). Ако прихватате све услове договора, обележите квадратић испод. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Пажљиво прочитајте договор о праву коришћења пре деинсталације програма $(^NameDA). Ако прихватате све услове договора, изаберите прву опцију испод. $_CLICK
|
||||
# ^Custom
|
||||
Прилагођавање
|
||||
# ^ComponentsText
|
||||
Изаберите компоненте за инсталацију. Инсталирају се само означене компоненте. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Изаберите тип инсталације:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Изаберите компоненте за инсталацију:
|
||||
# ^ComponentsSubText2
|
||||
Или, изаберите опционе компоненте које желите да инсталирате:
|
||||
# ^UnComponentsText
|
||||
Изаберите компоненте за деинсталацију. Деинсталирају се само означене компоненте. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Изаберите тип деинсталације:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Изаберите компоненте за деинсталацију:
|
||||
# ^UnComponentsSubText2
|
||||
Или, изаберите опционе компоненте које желите да деинсталирате:
|
||||
# ^DirText
|
||||
Програм $(^NameDA) ће бити инсталиран у наведени фолдер. За инсталацију у други фолдер притисните дугме „Избор...“ и изаберите фолдер. $_CLICK
|
||||
# ^DirSubText
|
||||
Фолдер
|
||||
# ^DirBrowseText
|
||||
Изаберите фолдер у који ћете инсталирати програм $(^NameDA):
|
||||
# ^UnDirText
|
||||
Програм $(^NameDA) ће бити деинсталиран из наведеног фолдера. За деинсталацију из другог фолдера притисните дугме „Избор...“ и изаберите фолдер. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Изаберите фолдер из кога ћете деинсталирати програм $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"Слободан простор: "
|
||||
# ^SpaceRequired
|
||||
"Потребан простор: "
|
||||
# ^UninstallingText
|
||||
Програм $(^NameDA) ће бити деинсталиран из наведеног фолдера. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Деинсталација из:
|
||||
# ^FileError
|
||||
Грешка при отварању фајла за писање: \r\n\t"$0"\r\nПритисните дугме „Одустани“ за прекид инсталације,\r\n„Понови“ за поновни покушај писања у фајл, или\r\n„Игнориши“ за прескакање овог фајла.
|
||||
# ^FileError_NoIgnore
|
||||
Грешка при отварању фајла за писање: \r\n\t"$0"\r\nПритисните дугме „Понови“ за поновни покушај писања у фајл, или\r\n„Одустани“ за прекид инсталирања.
|
||||
# ^CantWrite
|
||||
"Немогуће писање: "
|
||||
# ^CopyFailed
|
||||
Неуспешно копирање
|
||||
# ^CopyTo
|
||||
"Копирање у "
|
||||
# ^Registering
|
||||
"Регистровање: "
|
||||
# ^Unregistering
|
||||
"Дерегистровање: "
|
||||
# ^SymbolNotFound
|
||||
"Симбол није нађен: "
|
||||
# ^CouldNotLoad
|
||||
"Немогуће учитавање: "
|
||||
# ^CreateFolder
|
||||
"Креирање фолдера: "
|
||||
# ^CreateShortcut
|
||||
"Креирање пречице: "
|
||||
# ^CreatedUninstaller
|
||||
"Креирање деинсталера: "
|
||||
# ^Delete
|
||||
"Брисање фајла: "
|
||||
# ^DeleteOnReboot
|
||||
"Брисање при рестарту: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Грешка при креирању пречице: "
|
||||
# ^ErrorCreating
|
||||
"Грешка при креирању: "
|
||||
# ^ErrorDecompressing
|
||||
Грешка при отпакивању података! Оштећен инсталациони програм?
|
||||
# ^ErrorRegistering
|
||||
Грешка при регистровању библиотеке
|
||||
# ^ExecShell
|
||||
"Извршавање у окружењу: "
|
||||
# ^Exec
|
||||
"Извршавање: "
|
||||
# ^Extract
|
||||
"Отпакивање: "
|
||||
# ^ErrorWriting
|
||||
"Отпакивање: грешка при упису у фајл "
|
||||
# ^InvalidOpcode
|
||||
Оштећен инсталациони програм: неисправна команда
|
||||
# ^NoOLE
|
||||
"Нема OLE подршке за: "
|
||||
# ^OutputFolder
|
||||
"Излазни фолдер: "
|
||||
# ^RemoveFolder
|
||||
"Брисање фолдера: "
|
||||
# ^RenameOnReboot
|
||||
"Преименовање при рестартовању: "
|
||||
# ^Rename
|
||||
"Преименован: "
|
||||
# ^Skipped
|
||||
"Прескочен: "
|
||||
# ^CopyDetails
|
||||
Копирај детаље у клипборд
|
||||
# ^LogInstall
|
||||
Води записник о процесу инсталације
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
k
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
G
|
||||
|
|
@ -1,190 +1,190 @@
|
|||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
2074
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1250
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by Srðan Obuæina <obucina@srpskijezik.edu.yu>
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
$(^Name) Instalacija
|
||||
# ^UninstallCaption
|
||||
$(^Name) Deinstalacija
|
||||
# ^LicenseSubCaption
|
||||
: Dogovor o pravu korišæenja
|
||||
# ^ComponentsSubCaption
|
||||
: Opcije instalacije
|
||||
# ^DirSubCaption
|
||||
: Izbor foldera za instalaciju
|
||||
# ^InstallingSubCaption
|
||||
: Instalacija
|
||||
# ^CompletedSubCaption
|
||||
: Završena instalacija
|
||||
# ^UnComponentsSubCaption
|
||||
: Opcije deinstalacije
|
||||
# ^UnDirSubCaption
|
||||
: Izbor foldera za deinstalaciju
|
||||
# ^ConfirmSubCaption
|
||||
: Potvrðivanje
|
||||
# ^UninstallingSubCaption
|
||||
: Deinstalacija
|
||||
# ^UnCompletedSubCaption
|
||||
: Završena deinstalacija
|
||||
# ^BackBtn
|
||||
< Nazad
|
||||
# ^NextBtn
|
||||
Napred >
|
||||
# ^AgreeBtn
|
||||
Prihvatam
|
||||
# ^AcceptBtn
|
||||
Prihvatam uslove dogovora o pravu korišæenja
|
||||
# ^DontAcceptBtn
|
||||
Ne prihvatam uslove dogovora o pravu korišæenja
|
||||
# ^InstallBtn
|
||||
Instaliraj
|
||||
# ^UninstallBtn
|
||||
Deinstaliraj
|
||||
# ^CancelBtn
|
||||
Odustani
|
||||
# ^CloseBtn
|
||||
Zatvori
|
||||
# ^BrowseBtn
|
||||
Izbor...
|
||||
# ^ShowDetailsBtn
|
||||
Detalji
|
||||
# ^ClickNext
|
||||
Pritisnite dugme „Napred“ za nastavak.
|
||||
# ^ClickInstall
|
||||
Pritisnite dugme „Instaliraj“ za poèetak instalacije.
|
||||
# ^ClickUninstall
|
||||
Pritisnite dugme „Deinstaliraj“ za poèetak deinstalacije.
|
||||
# ^Name
|
||||
Ime
|
||||
# ^Completed
|
||||
Završeno
|
||||
# ^LicenseText
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
|
||||
# ^LicenseTextCB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
|
||||
# ^UnLicenseTextCB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
|
||||
# ^Custom
|
||||
Prilagoðavanje
|
||||
# ^ComponentsText
|
||||
Izaberite komponente za instalaciju. Instaliraju se samo oznaèene komponente. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Izaberite tip instalacije:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Izaberite komponente za instalaciju:
|
||||
# ^ComponentsSubText2
|
||||
Ili, izaberite opcione komponente koje želite da instalirate:
|
||||
# ^UnComponentsText
|
||||
Izaberite komponente za deinstalaciju. Deinstaliraju se samo oznaèene komponente. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Izaberite tip deinstalacije:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Izaberite komponente za deinstalaciju:
|
||||
# ^UnComponentsSubText2
|
||||
Ili, izaberite opcione komponente koje želite da deinstalirate:
|
||||
# ^DirText
|
||||
Program $(^NameDA) æe biti instaliran u navedeni folder. Za instalaciju u drugi folder pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
|
||||
# ^DirSubText
|
||||
Folder
|
||||
# ^DirBrowseText
|
||||
Izaberite folder u koji æete instalirati program $(^NameDA):
|
||||
# ^UnDirText
|
||||
Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. Za deinstalaciju iz drugog foldera pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Izaberite folder iz koga æete deinstalirati program $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"Slobodan prostor: "
|
||||
# ^SpaceRequired
|
||||
"Potreban prostor: "
|
||||
# ^UninstallingText
|
||||
Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Deinstalacija iz:
|
||||
# ^FileError
|
||||
Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Odustani“ za prekid instalacije,\r\n„Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Ignoriši“ za preskakanje ovog fajla.
|
||||
# ^FileError_NoIgnore
|
||||
Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Odustani“ za prekid instaliranja.
|
||||
# ^CantWrite
|
||||
"Nemoguæe pisanje: "
|
||||
# ^CopyFailed
|
||||
Neuspešno kopiranje
|
||||
# ^CopyTo
|
||||
"Kopiranje u "
|
||||
# ^Registering
|
||||
"Registrovanje: "
|
||||
# ^Unregistering
|
||||
"Deregistrovanje: "
|
||||
# ^SymbolNotFound
|
||||
"Simbol nije naðen: "
|
||||
# ^CouldNotLoad
|
||||
"Nemoguæe uèitavanje: "
|
||||
# ^CreateFolder
|
||||
"Kreiranje foldera: "
|
||||
# ^CreateShortcut
|
||||
"Kreiranje preèice: "
|
||||
# ^CreatedUninstaller
|
||||
"Kreiranje deinstalera: "
|
||||
# ^Delete
|
||||
"Brisanje fajla: "
|
||||
# ^DeleteOnReboot
|
||||
"Brisanje pri restartu: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Greška pri kreiranju preèice: "
|
||||
# ^ErrorCreating
|
||||
"Greška pri kreiranju: "
|
||||
# ^ErrorDecompressing
|
||||
Greška pri otpakivanju podataka! Ošteæen instalacioni program?
|
||||
# ^ErrorRegistering
|
||||
Greška pri registrovanju biblioteke
|
||||
# ^ExecShell
|
||||
"Izvršavanje u okruženju: "
|
||||
# ^Exec
|
||||
"Izvršavanje: "
|
||||
# ^Extract
|
||||
"Otpakivanje: "
|
||||
# ^ErrorWriting
|
||||
"Otpakivanje: greška pri upisu u fajl "
|
||||
# ^InvalidOpcode
|
||||
Ošteæen instalacioni program: neispravna komanda
|
||||
# ^NoOLE
|
||||
"Nema OLE podrške za: "
|
||||
# ^OutputFolder
|
||||
"Izlazni folder: "
|
||||
# ^RemoveFolder
|
||||
"Brisanje foldera: "
|
||||
# ^RenameOnReboot
|
||||
"Preimenovanje pri restartu: "
|
||||
# ^Rename
|
||||
"Preimenovan: "
|
||||
# ^Skipped
|
||||
"Preskoèen: "
|
||||
# ^CopyDetails
|
||||
Kopiraj detalje u klipbord
|
||||
# ^LogInstall
|
||||
Vodi zapisnik o procesu instalacije
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
k
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
2074
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1250
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
# Translation by Srðan Obuæina <obucina@srpskijezik.edu.yu>
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
$(^Name) Instalacija
|
||||
# ^UninstallCaption
|
||||
$(^Name) Deinstalacija
|
||||
# ^LicenseSubCaption
|
||||
: Dogovor o pravu korišæenja
|
||||
# ^ComponentsSubCaption
|
||||
: Opcije instalacije
|
||||
# ^DirSubCaption
|
||||
: Izbor foldera za instalaciju
|
||||
# ^InstallingSubCaption
|
||||
: Instalacija
|
||||
# ^CompletedSubCaption
|
||||
: Završena instalacija
|
||||
# ^UnComponentsSubCaption
|
||||
: Opcije deinstalacije
|
||||
# ^UnDirSubCaption
|
||||
: Izbor foldera za deinstalaciju
|
||||
# ^ConfirmSubCaption
|
||||
: Potvrðivanje
|
||||
# ^UninstallingSubCaption
|
||||
: Deinstalacija
|
||||
# ^UnCompletedSubCaption
|
||||
: Završena deinstalacija
|
||||
# ^BackBtn
|
||||
< Nazad
|
||||
# ^NextBtn
|
||||
Napred >
|
||||
# ^AgreeBtn
|
||||
Prihvatam
|
||||
# ^AcceptBtn
|
||||
Prihvatam uslove dogovora o pravu korišæenja
|
||||
# ^DontAcceptBtn
|
||||
Ne prihvatam uslove dogovora o pravu korišæenja
|
||||
# ^InstallBtn
|
||||
Instaliraj
|
||||
# ^UninstallBtn
|
||||
Deinstaliraj
|
||||
# ^CancelBtn
|
||||
Odustani
|
||||
# ^CloseBtn
|
||||
Zatvori
|
||||
# ^BrowseBtn
|
||||
Izbor...
|
||||
# ^ShowDetailsBtn
|
||||
Detalji
|
||||
# ^ClickNext
|
||||
Pritisnite dugme „Napred“ za nastavak.
|
||||
# ^ClickInstall
|
||||
Pritisnite dugme „Instaliraj“ za poèetak instalacije.
|
||||
# ^ClickUninstall
|
||||
Pritisnite dugme „Deinstaliraj“ za poèetak deinstalacije.
|
||||
# ^Name
|
||||
Ime
|
||||
# ^Completed
|
||||
Završeno
|
||||
# ^LicenseText
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
|
||||
# ^LicenseTextCB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
|
||||
# ^UnLicenseTextCB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
|
||||
# ^Custom
|
||||
Prilagoðavanje
|
||||
# ^ComponentsText
|
||||
Izaberite komponente za instalaciju. Instaliraju se samo oznaèene komponente. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Izaberite tip instalacije:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Izaberite komponente za instalaciju:
|
||||
# ^ComponentsSubText2
|
||||
Ili, izaberite opcione komponente koje želite da instalirate:
|
||||
# ^UnComponentsText
|
||||
Izaberite komponente za deinstalaciju. Deinstaliraju se samo oznaèene komponente. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Izaberite tip deinstalacije:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Izaberite komponente za deinstalaciju:
|
||||
# ^UnComponentsSubText2
|
||||
Ili, izaberite opcione komponente koje želite da deinstalirate:
|
||||
# ^DirText
|
||||
Program $(^NameDA) æe biti instaliran u navedeni folder. Za instalaciju u drugi folder pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
|
||||
# ^DirSubText
|
||||
Folder
|
||||
# ^DirBrowseText
|
||||
Izaberite folder u koji æete instalirati program $(^NameDA):
|
||||
# ^UnDirText
|
||||
Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. Za deinstalaciju iz drugog foldera pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Izaberite folder iz koga æete deinstalirati program $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"Slobodan prostor: "
|
||||
# ^SpaceRequired
|
||||
"Potreban prostor: "
|
||||
# ^UninstallingText
|
||||
Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Deinstalacija iz:
|
||||
# ^FileError
|
||||
Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Odustani“ za prekid instalacije,\r\n„Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Ignoriši“ za preskakanje ovog fajla.
|
||||
# ^FileError_NoIgnore
|
||||
Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Odustani“ za prekid instaliranja.
|
||||
# ^CantWrite
|
||||
"Nemoguæe pisanje: "
|
||||
# ^CopyFailed
|
||||
Neuspešno kopiranje
|
||||
# ^CopyTo
|
||||
"Kopiranje u "
|
||||
# ^Registering
|
||||
"Registrovanje: "
|
||||
# ^Unregistering
|
||||
"Deregistrovanje: "
|
||||
# ^SymbolNotFound
|
||||
"Simbol nije naðen: "
|
||||
# ^CouldNotLoad
|
||||
"Nemoguæe uèitavanje: "
|
||||
# ^CreateFolder
|
||||
"Kreiranje foldera: "
|
||||
# ^CreateShortcut
|
||||
"Kreiranje preèice: "
|
||||
# ^CreatedUninstaller
|
||||
"Kreiranje deinstalera: "
|
||||
# ^Delete
|
||||
"Brisanje fajla: "
|
||||
# ^DeleteOnReboot
|
||||
"Brisanje pri restartu: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Greška pri kreiranju preèice: "
|
||||
# ^ErrorCreating
|
||||
"Greška pri kreiranju: "
|
||||
# ^ErrorDecompressing
|
||||
Greška pri otpakivanju podataka! Ošteæen instalacioni program?
|
||||
# ^ErrorRegistering
|
||||
Greška pri registrovanju biblioteke
|
||||
# ^ExecShell
|
||||
"Izvršavanje u okruženju: "
|
||||
# ^Exec
|
||||
"Izvršavanje: "
|
||||
# ^Extract
|
||||
"Otpakivanje: "
|
||||
# ^ErrorWriting
|
||||
"Otpakivanje: greška pri upisu u fajl "
|
||||
# ^InvalidOpcode
|
||||
Ošteæen instalacioni program: neispravna komanda
|
||||
# ^NoOLE
|
||||
"Nema OLE podrške za: "
|
||||
# ^OutputFolder
|
||||
"Izlazni folder: "
|
||||
# ^RemoveFolder
|
||||
"Brisanje foldera: "
|
||||
# ^RenameOnReboot
|
||||
"Preimenovanje pri restartu: "
|
||||
# ^Rename
|
||||
"Preimenovan: "
|
||||
# ^Skipped
|
||||
"Preskoèen: "
|
||||
# ^CopyDetails
|
||||
Kopiraj detalje u klipbord
|
||||
# ^LogInstall
|
||||
Vodi zapisnik o procesu instalacije
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
k
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
G
|
||||
|
|
@ -1,190 +1,190 @@
|
|||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
1051
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1250
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
#Translated by: Kypec (peter.dzugas@mahe.sk); edited by: Marián Hikaník (podnety@mojepreklady.net), Ivan Masár <helix84@centrum.sk>, 2008.
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
Inštalácia programu $(^Name)
|
||||
# ^UninstallCaption
|
||||
Odinštalovanie programu $(^Name)
|
||||
# ^LicenseSubCaption
|
||||
: Licenèná zmluva
|
||||
# ^ComponentsSubCaption
|
||||
: Možnosti inštalácie
|
||||
# ^DirSubCaption
|
||||
: Inštalaèný prieèinok
|
||||
# ^InstallingSubCaption
|
||||
: Prebieha inštalácia
|
||||
# ^CompletedSubCaption
|
||||
: Hotovo
|
||||
# ^UnComponentsSubCaption
|
||||
: Možnosti odinštalovania
|
||||
# ^UnDirSubCaption
|
||||
: Prieèinok s informáciami pre odinštalovanie
|
||||
# ^ConfirmSubCaption
|
||||
: Potvrdenie
|
||||
# ^UninstallingSubCaption
|
||||
: Prebieha odinštalácia
|
||||
# ^UnCompletedSubCaption
|
||||
: Hotovo
|
||||
# ^BackBtn
|
||||
< &Spä<70>
|
||||
# ^NextBtn
|
||||
Ï&alej >
|
||||
# ^AgreeBtn
|
||||
&Súhlasím
|
||||
# ^AcceptBtn
|
||||
&Súhlasím s podmienkami licenènej zmluvy
|
||||
# ^DontAcceptBtn
|
||||
N&esúhlasím s podmienkami licenènej zmluvy
|
||||
# ^InstallBtn
|
||||
&Nainštalova<76>
|
||||
# ^UninstallBtn
|
||||
&Odinštalova<76>
|
||||
# ^CancelBtn
|
||||
Zruši<EFBFBD>
|
||||
# ^CloseBtn
|
||||
&Zatvori<72>
|
||||
# ^BrowseBtn
|
||||
&Preh¾adáva<76>...
|
||||
# ^ShowDetailsBtn
|
||||
&Podrobnosti
|
||||
# ^ClickNext
|
||||
V inštalácii pokraèujte kliknutím na tlaèidlo Ïalej.
|
||||
# ^ClickInstall
|
||||
Pre spustenie inštalácie kliknite na tlaèidlo Nainštalova<76>.
|
||||
# ^ClickUninstall
|
||||
Pre spustenie procesu odinštalovania kliknite na tlaèidlo Odinštalova<76>.
|
||||
# ^Name
|
||||
Názov
|
||||
# ^Completed
|
||||
Hotovo
|
||||
# ^LicenseText
|
||||
Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
|
||||
# ^LicenseTextCB
|
||||
Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
|
||||
# ^UnLicenseTextCB
|
||||
Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
|
||||
# ^Custom
|
||||
Volite¾ná
|
||||
# ^ComponentsText
|
||||
Oznaète súèasti programu, ktoré chcete nainštalova<76> a odznaète tie, ktoré nainštalova<76> nechcete. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Vyberte si typ inštalácie:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Vyberte si tie súèasti programu, ktoré chcete nainštalova<76>:
|
||||
# ^ComponentsSubText2
|
||||
Alebo oznaète volite¾né doplnky, ktoré chcete nainštalova<76>:
|
||||
# ^UnComponentsText
|
||||
Oznaète súèasti programu, ktoré chcete odinštalova<76> a odznaète tie, ktoré chcete ponecha<68> nainštalované. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Zvo¾te typ deinštalácie:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Vyberte súèasti, ktoré chcete odinštalova<76>:
|
||||
# ^UnComponentsSubText2
|
||||
Alebo oznaète volite¾né súèasti, ktoré chcete odinštalova<76>:
|
||||
# ^DirText
|
||||
$(^NameDA) bude nainštalovaný do nasledujúceho prieèinka. Inštalova<76> do iného prieèinka môžete po kliknutí na tlaèidlo Preh¾adáva<76> a vybraní iného prieèinka. $_CLICK
|
||||
# ^DirSubText
|
||||
Cie¾ový prieèinok
|
||||
# ^DirBrowseText
|
||||
Zvo¾te prieèinok, do ktorého sa nainštaluje program $(^NameDA):
|
||||
# ^UnDirText
|
||||
Inštalátor odinštaluje program $(^NameDA) z nasledovného prieèinka. Ak ho chcete odinštalova<76> z iného prieèinka, kliknite na tlaèidlo Preh¾adáva<76> a vyberte iný prieèinok. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Zvo¾te prieèinok, z ktorého sa odinštaluje program $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"Vo¾né miesto na disku: "
|
||||
# ^SpaceRequired
|
||||
"Potrebné miesto na disku: "
|
||||
# ^UninstallingText
|
||||
Program $(^NameDA) sa odinštaluje z nasledovného prieèinka. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Prebieha odinštalovanie z:
|
||||
# ^FileError
|
||||
Chyba pri otváraní súboru na zápis: \r\n\r\n$0\r\n\r\n. Ak chcete inštaláciu ukonèi<C3A8>, kliknite na tlaèidlo Ukonèi<C3A8>,\r\ ak chcete zápis súboru zopakova<76>, kliknite na tlaèidlo Opakova<76> alebo kliknite na tlaèidlo \r\nIgnorova<76>, ak chcete inštaláciu tohto súboru vynecha<68>.
|
||||
# ^FileError_NoIgnore
|
||||
Chyba pri otváraní súboru na zápis: \r\n\r\n$0\r\n\r\n. Ak chcete zopakova<76> zápis súboru, kliknite na tlaèidlo Opakova<76>, alebo kliknite na tlaèidlo \r\nZruši<C5A1>, v prípade, že chcete inštaláciu ukonèi<C3A8>.
|
||||
# ^CantWrite
|
||||
"Nemožno zapísa<73> súbor: "
|
||||
# ^CopyFailed
|
||||
Kopírovanie zlyhalo.
|
||||
# ^CopyTo
|
||||
"Kopírova<76> do "
|
||||
# ^Registering
|
||||
"Registruje sa: "
|
||||
# ^Unregistering
|
||||
"Vymazáva sa z registra: "
|
||||
# ^SymbolNotFound
|
||||
"Nemožno nájs<6A> symbol: "
|
||||
# ^CouldNotLoad
|
||||
"Nemožno naèíta<74>: "
|
||||
# ^CreateFolder
|
||||
"Vytvorený prieèinok: "
|
||||
# ^CreateShortcut
|
||||
"Vytvorený odkaz: "
|
||||
# ^CreatedUninstaller
|
||||
"Program pre odinštalovanie: "
|
||||
# ^Delete
|
||||
"Vymazaný súbor: "
|
||||
# ^DeleteOnReboot
|
||||
"Vymaza<7A> po reštartovaní systému: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Chyba pri vytváraní odkazu: "
|
||||
# ^ErrorCreating
|
||||
"Chyba pri vytváraní: "
|
||||
# ^ErrorDecompressing
|
||||
Chyba pri dekomprimovaní dát! Inštalátor je pravdepodobne poškodený...
|
||||
# ^ErrorRegistering
|
||||
Chyba pri registrácii súèasti
|
||||
# ^ExecShell
|
||||
"Vykona<6E> príkaz: "
|
||||
# ^Exec
|
||||
"Spusti<74>: "
|
||||
# ^Extract
|
||||
"Extrahuje sa: "
|
||||
# ^ErrorWriting
|
||||
"Chyba pri zápise do súboru "
|
||||
# ^InvalidOpcode
|
||||
Inštalátor je pravdepodobne poškodený, pretože obsahuje neplatný operaèný kód.
|
||||
# ^NoOLE
|
||||
"Žiadny zápis OLE pre: "
|
||||
# ^OutputFolder
|
||||
"Výstupný prieèinok: "
|
||||
# ^RemoveFolder
|
||||
"Odstráni<6E> prieèinok: "
|
||||
# ^RenameOnReboot
|
||||
"Premenova<76> po reštartovaní systému: "
|
||||
# ^Rename
|
||||
"Premenova<76>: "
|
||||
# ^Skipped
|
||||
"Vynechané: "
|
||||
# ^CopyDetails
|
||||
Skopírova<EFBFBD> podrobnosti do schránky
|
||||
# ^LogInstall
|
||||
Zaznamena<EFBFBD> priebeh inštalácie
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
K
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
# Header, don't edit
|
||||
NLF v6
|
||||
# Language ID
|
||||
1051
|
||||
# Font and size - dash (-) means default
|
||||
-
|
||||
-
|
||||
# Codepage - dash (-) means ANSI code page
|
||||
1250
|
||||
# RTL - anything else than RTL means LTR
|
||||
-
|
||||
#Translated by: Kypec (peter.dzugas@mahe.sk); edited by: Marián Hikaník (podnety@mojepreklady.net), Ivan Masár <helix84@centrum.sk>, 2008.
|
||||
# ^Branding
|
||||
Nullsoft Install System %s
|
||||
# ^SetupCaption
|
||||
Inštalácia programu $(^Name)
|
||||
# ^UninstallCaption
|
||||
Odinštalovanie programu $(^Name)
|
||||
# ^LicenseSubCaption
|
||||
: Licenèná zmluva
|
||||
# ^ComponentsSubCaption
|
||||
: Možnosti inštalácie
|
||||
# ^DirSubCaption
|
||||
: Inštalaèný prieèinok
|
||||
# ^InstallingSubCaption
|
||||
: Prebieha inštalácia
|
||||
# ^CompletedSubCaption
|
||||
: Hotovo
|
||||
# ^UnComponentsSubCaption
|
||||
: Možnosti odinštalovania
|
||||
# ^UnDirSubCaption
|
||||
: Prieèinok s informáciami pre odinštalovanie
|
||||
# ^ConfirmSubCaption
|
||||
: Potvrdenie
|
||||
# ^UninstallingSubCaption
|
||||
: Prebieha odinštalácia
|
||||
# ^UnCompletedSubCaption
|
||||
: Hotovo
|
||||
# ^BackBtn
|
||||
< &Spä<70>
|
||||
# ^NextBtn
|
||||
Ï&alej >
|
||||
# ^AgreeBtn
|
||||
&Súhlasím
|
||||
# ^AcceptBtn
|
||||
&Súhlasím s podmienkami licenènej zmluvy
|
||||
# ^DontAcceptBtn
|
||||
N&esúhlasím s podmienkami licenènej zmluvy
|
||||
# ^InstallBtn
|
||||
&Nainštalova<76>
|
||||
# ^UninstallBtn
|
||||
&Odinštalova<76>
|
||||
# ^CancelBtn
|
||||
Zruši<EFBFBD>
|
||||
# ^CloseBtn
|
||||
&Zatvori<72>
|
||||
# ^BrowseBtn
|
||||
&Preh¾adáva<76>...
|
||||
# ^ShowDetailsBtn
|
||||
&Podrobnosti
|
||||
# ^ClickNext
|
||||
V inštalácii pokraèujte kliknutím na tlaèidlo Ïalej.
|
||||
# ^ClickInstall
|
||||
Pre spustenie inštalácie kliknite na tlaèidlo Nainštalova<76>.
|
||||
# ^ClickUninstall
|
||||
Pre spustenie procesu odinštalovania kliknite na tlaèidlo Odinštalova<76>.
|
||||
# ^Name
|
||||
Názov
|
||||
# ^Completed
|
||||
Hotovo
|
||||
# ^LicenseText
|
||||
Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
|
||||
# ^LicenseTextCB
|
||||
Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
|
||||
# ^LicenseTextRB
|
||||
Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
|
||||
# ^UnLicenseText
|
||||
Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
|
||||
# ^UnLicenseTextCB
|
||||
Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
|
||||
# ^UnLicenseTextRB
|
||||
Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
|
||||
# ^Custom
|
||||
Volite¾ná
|
||||
# ^ComponentsText
|
||||
Oznaète súèasti programu, ktoré chcete nainštalova<76> a odznaète tie, ktoré nainštalova<76> nechcete. $_CLICK
|
||||
# ^ComponentsSubText1
|
||||
Vyberte si typ inštalácie:
|
||||
# ^ComponentsSubText2_NoInstTypes
|
||||
Vyberte si tie súèasti programu, ktoré chcete nainštalova<76>:
|
||||
# ^ComponentsSubText2
|
||||
Alebo oznaète volite¾né doplnky, ktoré chcete nainštalova<76>:
|
||||
# ^UnComponentsText
|
||||
Oznaète súèasti programu, ktoré chcete odinštalova<76> a odznaète tie, ktoré chcete ponecha<68> nainštalované. $_CLICK
|
||||
# ^UnComponentsSubText1
|
||||
Zvo¾te typ deinštalácie:
|
||||
# ^UnComponentsSubText2_NoInstTypes
|
||||
Vyberte súèasti, ktoré chcete odinštalova<76>:
|
||||
# ^UnComponentsSubText2
|
||||
Alebo oznaète volite¾né súèasti, ktoré chcete odinštalova<76>:
|
||||
# ^DirText
|
||||
$(^NameDA) bude nainštalovaný do nasledujúceho prieèinka. Inštalova<76> do iného prieèinka môžete po kliknutí na tlaèidlo Preh¾adáva<76> a vybraní iného prieèinka. $_CLICK
|
||||
# ^DirSubText
|
||||
Cie¾ový prieèinok
|
||||
# ^DirBrowseText
|
||||
Zvo¾te prieèinok, do ktorého sa nainštaluje program $(^NameDA):
|
||||
# ^UnDirText
|
||||
Inštalátor odinštaluje program $(^NameDA) z nasledovného prieèinka. Ak ho chcete odinštalova<76> z iného prieèinka, kliknite na tlaèidlo Preh¾adáva<76> a vyberte iný prieèinok. $_CLICK
|
||||
# ^UnDirSubText
|
||||
""
|
||||
# ^UnDirBrowseText
|
||||
Zvo¾te prieèinok, z ktorého sa odinštaluje program $(^NameDA):
|
||||
# ^SpaceAvailable
|
||||
"Vo¾né miesto na disku: "
|
||||
# ^SpaceRequired
|
||||
"Potrebné miesto na disku: "
|
||||
# ^UninstallingText
|
||||
Program $(^NameDA) sa odinštaluje z nasledovného prieèinka. $_CLICK
|
||||
# ^UninstallingSubText
|
||||
Prebieha odinštalovanie z:
|
||||
# ^FileError
|
||||
Chyba pri otváraní súboru na zápis: \r\n\r\n$0\r\n\r\n. Ak chcete inštaláciu ukonèi<C3A8>, kliknite na tlaèidlo Ukonèi<C3A8>,\r\ ak chcete zápis súboru zopakova<76>, kliknite na tlaèidlo Opakova<76> alebo kliknite na tlaèidlo \r\nIgnorova<76>, ak chcete inštaláciu tohto súboru vynecha<68>.
|
||||
# ^FileError_NoIgnore
|
||||
Chyba pri otváraní súboru na zápis: \r\n\r\n$0\r\n\r\n. Ak chcete zopakova<76> zápis súboru, kliknite na tlaèidlo Opakova<76>, alebo kliknite na tlaèidlo \r\nZruši<C5A1>, v prípade, že chcete inštaláciu ukonèi<C3A8>.
|
||||
# ^CantWrite
|
||||
"Nemožno zapísa<73> súbor: "
|
||||
# ^CopyFailed
|
||||
Kopírovanie zlyhalo.
|
||||
# ^CopyTo
|
||||
"Kopírova<76> do "
|
||||
# ^Registering
|
||||
"Registruje sa: "
|
||||
# ^Unregistering
|
||||
"Vymazáva sa z registra: "
|
||||
# ^SymbolNotFound
|
||||
"Nemožno nájs<6A> symbol: "
|
||||
# ^CouldNotLoad
|
||||
"Nemožno naèíta<74>: "
|
||||
# ^CreateFolder
|
||||
"Vytvorený prieèinok: "
|
||||
# ^CreateShortcut
|
||||
"Vytvorený odkaz: "
|
||||
# ^CreatedUninstaller
|
||||
"Program pre odinštalovanie: "
|
||||
# ^Delete
|
||||
"Vymazaný súbor: "
|
||||
# ^DeleteOnReboot
|
||||
"Vymaza<7A> po reštartovaní systému: "
|
||||
# ^ErrorCreatingShortcut
|
||||
"Chyba pri vytváraní odkazu: "
|
||||
# ^ErrorCreating
|
||||
"Chyba pri vytváraní: "
|
||||
# ^ErrorDecompressing
|
||||
Chyba pri dekomprimovaní dát! Inštalátor je pravdepodobne poškodený...
|
||||
# ^ErrorRegistering
|
||||
Chyba pri registrácii súèasti
|
||||
# ^ExecShell
|
||||
"Vykona<6E> príkaz: "
|
||||
# ^Exec
|
||||
"Spusti<74>: "
|
||||
# ^Extract
|
||||
"Extrahuje sa: "
|
||||
# ^ErrorWriting
|
||||
"Chyba pri zápise do súboru "
|
||||
# ^InvalidOpcode
|
||||
Inštalátor je pravdepodobne poškodený, pretože obsahuje neplatný operaèný kód.
|
||||
# ^NoOLE
|
||||
"Žiadny zápis OLE pre: "
|
||||
# ^OutputFolder
|
||||
"Výstupný prieèinok: "
|
||||
# ^RemoveFolder
|
||||
"Odstráni<6E> prieèinok: "
|
||||
# ^RenameOnReboot
|
||||
"Premenova<76> po reštartovaní systému: "
|
||||
# ^Rename
|
||||
"Premenova<76>: "
|
||||
# ^Skipped
|
||||
"Vynechané: "
|
||||
# ^CopyDetails
|
||||
Skopírova<EFBFBD> podrobnosti do schránky
|
||||
# ^LogInstall
|
||||
Zaznamena<EFBFBD> priebeh inštalácie
|
||||
# ^Byte
|
||||
B
|
||||
# ^Kilo
|
||||
K
|
||||
# ^Mega
|
||||
M
|
||||
# ^Giga
|
||||
G
|
||||
|
|
@ -1,133 +1,133 @@
|
|||
;Language: Slovak (1051)
|
||||
;Translated by:
|
||||
; Kypec (peter.dzugas@mahe.sk)
|
||||
;edited by:
|
||||
; Marián Hikaník (podnety@mojepreklady.net)
|
||||
; Ivan Masár <helix84@centrum.sk>, 2008.
|
||||
|
||||
!insertmacro LANGFILE "Slovak" "Slovensky"
|
||||
|
||||
!ifdef MUI_WELCOMEPAGE
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi inštaláciou programu $(^NameDA)"
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tento sprievodca vás prevedie inštaláciou $(^NameDA).$\r$\n$\r$\nPred zaèiatkom inštalácie sa odporúèa ukonèi<C3A8> všetky ostatné programy. Tým umožníte aktualizovanie systémových súborov bez potreby reštartovania vášho poèítaèa.$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNWELCOMEPAGE
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi odinštalovaním programu $(^NameDA)"
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento sprievodca vás prevedie procesom odinštalovania programu $(^NameDA).$\r$\n$\r$\nPred spustením procesu odinštalovania sa uistite, že program $(^NameDA) nie je práve aktívny.$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèná zmluva"
|
||||
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pred inštaláciou $(^NameDA) si prosím preštudujte licenèné podmienky."
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, kliknite na tlaèidlo Súhlasím a môžete pokraèova<76> v inštalácii. Ak chcete v inštalácii pokraèova<76>, musíte odsúhlasi<73> podmienky licenènej zmluvy $(^NameDA)."
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Ak chcete v inštalácii pokraèova<76>, musíte odsúhlasi<73> podmienky licenènej zmluvy $(^NameDA)."
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami zmluvy, oznaète prvú z nižšie uvedených možností. Ak chcete v inštalácii pokraèova<76>, musíte odsúhlasi<73> podmienky licenènej zmluvy $(^NameDA)."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèná zmluva"
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pred odinštalovaním programu $(^NameDA) si prosím preèítajte licenèné podmienky."
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, zvo¾te Súhlasím. Licenènú zmluvu musíte odsúhlasi<73>, ak chcete v odinštalovaní programu $(^NameDA) pokraèova<76>."
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Licenènú zmluvu musíte odsúhlasi<73>, ak chcete pokraèova<76> v odinštalovaní programu $(^NameDA). $_CLICK"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami licenènej zmluvy, oznaète prvú z nižšie uvedených možností. Licenènú zmluvu musíte odsúhlasi<73>, ak chcete pokraèova<76> v odinštalovaní programu $(^NameDA). $_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Stlaèením klávesu Page Down posuniete text licenènej zmluvy."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vo¾ba súèastí programu"
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zvo¾te si tie súèasti programu $(^NameDA), ktoré chcete nainštalova<76>."
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Popis"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCOMPONENTSPAGE
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vo¾ba súèastí"
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zvo¾te súèasti programu $(^NameDA), ktoré chcete odinštalova<76>."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
|
||||
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
|
||||
!else
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vo¾ba umiestnenia programu"
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, do ktorého chcete nainštalova<76> program $(^NameDA)."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNDIRECTORYSPAGE
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Umiestenie programu pre odinštalovanie"
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, z ktorého chcete odinštalova<76> program $(^NameDA)."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_INSTFILESPAGE
|
||||
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Inštalácia"
|
||||
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Poèkajte prosím, kým prebehne inštalácia programu $(^NameDA)."
|
||||
${LangFileString} MUI_TEXT_FINISH_TITLE "Ukonèenie inštalácie"
|
||||
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Inštalácia bola dokonèená úspešne."
|
||||
${LangFileString} MUI_TEXT_ABORT_TITLE "Prerušenie inštalácie"
|
||||
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Inštaláciu sa nepodarilo dokonèi<C3A8>."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNINSTFILESPAGE
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odinštalovanie"
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Èakajte prosím, kým prebehne odinštalovanie programu $(^NameDA)."
|
||||
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ukonèenie odinštalovania"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinštalovanie bolo úspešne dokonèené."
|
||||
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Prerušenie odinštalovania"
|
||||
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odinštalovanie sa neukonèilo úspešne."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dokonèenie inštalácie programu $(^NameDA)"
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol nainštalovaný do vášho poèítaèa.$\r$\nKliknite na tlaèidlo Dokonèi<C3A8> a tento sprievodca sa ukonèí."
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie inštalácie programu $(^NameDA) je potrebné reštartova<76> váš poèítaè. Chcete ho reštartova<76> ihneï?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Dokonèenie sprievodcu odinštalovaním"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol odinštalovaný z vášho poèítaèa.$\r$\n$\r$\nKliknite na tlaèidlo Dokonèi<C3A8> a tento sprievodca sa ukonèí."
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie odinštalovania programu $(^NameDA) je nutné reštartova<76> váš poèítaè. Chcete ho reštartova<76> ihneï?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reštartova<EFBFBD> teraz"
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reštartova<EFBFBD> neskôr (manuálne)"
|
||||
${LangFileString} MUI_TEXT_FINISH_RUN "&Spusti<74> program $(^NameDA)"
|
||||
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Zobrazi<7A> súbor s informáciami"
|
||||
${LangFileString} MUI_BUTTONTEXT_FINISH "&Dokonèi<C3A8>"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_STARTMENUPAGE
|
||||
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vo¾ba umiestnenia v ponuke Štart"
|
||||
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vyberte si prieèinok v ponuke Štart, kam sa umiestnia odkazy na program $(^NameDA)."
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vyberte si prieèinok v ponuke Štart, v ktorom chcete vytvori<72> odkazy na program. Takisto môžete napísa<73> názov nového prieèinka."
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nevytvára<EFBFBD> odkazy"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCONFIRMPAGE
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinštalovanie programu $(^NameDA)"
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odstránenie programu $(^NameDA) z vášho poèítaèa."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_ABORTWARNING
|
||||
${LangFileString} MUI_TEXT_ABORTWARNING "Naozaj chcete ukonèi<C3A8> inštaláciu programu $(^Name)?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNABORTWARNING
|
||||
${LangFileString} MUI_UNTEXT_ABORTWARNING "Naozaj chcete ukonèi<C3A8> proces odinštalovania programu $(^Name)?"
|
||||
!endif
|
||||
|
||||
!ifdef MULTIUSER_INSTALLMODEPAGE
|
||||
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Vybra<EFBFBD> používate¾ov"
|
||||
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Vyberte pre ktorých používate¾ov chcete nainštalova<76> $(^NameDA)."
|
||||
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Vyberte, èi chcete nainštalova<76> program $(^NameDA) iba pre seba alebo pre všetkých používate¾ov tohto poèítaèa. $(^ClickNext)"
|
||||
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Nainštalova<EFBFBD> pre všetkých používate¾ov tohto poèítaèa"
|
||||
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Nainštalova<EFBFBD> iba pre mòa"
|
||||
;Language: Slovak (1051)
|
||||
;Translated by:
|
||||
; Kypec (peter.dzugas@mahe.sk)
|
||||
;edited by:
|
||||
; Marián Hikaník (podnety@mojepreklady.net)
|
||||
; Ivan Masár <helix84@centrum.sk>, 2008.
|
||||
|
||||
!insertmacro LANGFILE "Slovak" "Slovensky"
|
||||
|
||||
!ifdef MUI_WELCOMEPAGE
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi inštaláciou programu $(^NameDA)"
|
||||
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tento sprievodca vás prevedie inštaláciou $(^NameDA).$\r$\n$\r$\nPred zaèiatkom inštalácie sa odporúèa ukonèi<C3A8> všetky ostatné programy. Tým umožníte aktualizovanie systémových súborov bez potreby reštartovania vášho poèítaèa.$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNWELCOMEPAGE
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi odinštalovaním programu $(^NameDA)"
|
||||
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento sprievodca vás prevedie procesom odinštalovania programu $(^NameDA).$\r$\n$\r$\nPred spustením procesu odinštalovania sa uistite, že program $(^NameDA) nie je práve aktívny.$\r$\n$\r$\n$_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèná zmluva"
|
||||
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pred inštaláciou $(^NameDA) si prosím preštudujte licenèné podmienky."
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, kliknite na tlaèidlo Súhlasím a môžete pokraèova<76> v inštalácii. Ak chcete v inštalácii pokraèova<76>, musíte odsúhlasi<73> podmienky licenènej zmluvy $(^NameDA)."
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Ak chcete v inštalácii pokraèova<76>, musíte odsúhlasi<73> podmienky licenènej zmluvy $(^NameDA)."
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami zmluvy, oznaète prvú z nižšie uvedených možností. Ak chcete v inštalácii pokraèova<76>, musíte odsúhlasi<73> podmienky licenènej zmluvy $(^NameDA)."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèná zmluva"
|
||||
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pred odinštalovaním programu $(^NameDA) si prosím preèítajte licenèné podmienky."
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, zvo¾te Súhlasím. Licenènú zmluvu musíte odsúhlasi<73>, ak chcete v odinštalovaní programu $(^NameDA) pokraèova<76>."
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Licenènú zmluvu musíte odsúhlasi<73>, ak chcete pokraèova<76> v odinštalovaní programu $(^NameDA). $_CLICK"
|
||||
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami licenènej zmluvy, oznaète prvú z nižšie uvedených možností. Licenènú zmluvu musíte odsúhlasi<73>, ak chcete pokraèova<76> v odinštalovaní programu $(^NameDA). $_CLICK"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
|
||||
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Stlaèením klávesu Page Down posuniete text licenènej zmluvy."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vo¾ba súèastí programu"
|
||||
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zvo¾te si tie súèasti programu $(^NameDA), ktoré chcete nainštalova<76>."
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Popis"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCOMPONENTSPAGE
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vo¾ba súèastí"
|
||||
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zvo¾te súèasti programu $(^NameDA), ktoré chcete odinštalova<76>."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
|
||||
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
|
||||
!else
|
||||
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vo¾ba umiestnenia programu"
|
||||
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, do ktorého chcete nainštalova<76> program $(^NameDA)."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNDIRECTORYSPAGE
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Umiestenie programu pre odinštalovanie"
|
||||
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, z ktorého chcete odinštalova<76> program $(^NameDA)."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_INSTFILESPAGE
|
||||
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Inštalácia"
|
||||
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Poèkajte prosím, kým prebehne inštalácia programu $(^NameDA)."
|
||||
${LangFileString} MUI_TEXT_FINISH_TITLE "Ukonèenie inštalácie"
|
||||
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Inštalácia bola dokonèená úspešne."
|
||||
${LangFileString} MUI_TEXT_ABORT_TITLE "Prerušenie inštalácie"
|
||||
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Inštaláciu sa nepodarilo dokonèi<C3A8>."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNINSTFILESPAGE
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odinštalovanie"
|
||||
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Èakajte prosím, kým prebehne odinštalovanie programu $(^NameDA)."
|
||||
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ukonèenie odinštalovania"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinštalovanie bolo úspešne dokonèené."
|
||||
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Prerušenie odinštalovania"
|
||||
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odinštalovanie sa neukonèilo úspešne."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dokonèenie inštalácie programu $(^NameDA)"
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol nainštalovaný do vášho poèítaèa.$\r$\nKliknite na tlaèidlo Dokonèi<C3A8> a tento sprievodca sa ukonèí."
|
||||
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie inštalácie programu $(^NameDA) je potrebné reštartova<76> váš poèítaè. Chcete ho reštartova<76> ihneï?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Dokonèenie sprievodcu odinštalovaním"
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol odinštalovaný z vášho poèítaèa.$\r$\n$\r$\nKliknite na tlaèidlo Dokonèi<C3A8> a tento sprievodca sa ukonèí."
|
||||
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie odinštalovania programu $(^NameDA) je nutné reštartova<76> váš poèítaè. Chcete ho reštartova<76> ihneï?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reštartova<EFBFBD> teraz"
|
||||
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reštartova<EFBFBD> neskôr (manuálne)"
|
||||
${LangFileString} MUI_TEXT_FINISH_RUN "&Spusti<74> program $(^NameDA)"
|
||||
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Zobrazi<7A> súbor s informáciami"
|
||||
${LangFileString} MUI_BUTTONTEXT_FINISH "&Dokonèi<C3A8>"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_STARTMENUPAGE
|
||||
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vo¾ba umiestnenia v ponuke Štart"
|
||||
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vyberte si prieèinok v ponuke Štart, kam sa umiestnia odkazy na program $(^NameDA)."
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vyberte si prieèinok v ponuke Štart, v ktorom chcete vytvori<72> odkazy na program. Takisto môžete napísa<73> názov nového prieèinka."
|
||||
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nevytvára<EFBFBD> odkazy"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNCONFIRMPAGE
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinštalovanie programu $(^NameDA)"
|
||||
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odstránenie programu $(^NameDA) z vášho poèítaèa."
|
||||
!endif
|
||||
|
||||
!ifdef MUI_ABORTWARNING
|
||||
${LangFileString} MUI_TEXT_ABORTWARNING "Naozaj chcete ukonèi<C3A8> inštaláciu programu $(^Name)?"
|
||||
!endif
|
||||
|
||||
!ifdef MUI_UNABORTWARNING
|
||||
${LangFileString} MUI_UNTEXT_ABORTWARNING "Naozaj chcete ukonèi<C3A8> proces odinštalovania programu $(^Name)?"
|
||||
!endif
|
||||
|
||||
!ifdef MULTIUSER_INSTALLMODEPAGE
|
||||
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Vybra<EFBFBD> používate¾ov"
|
||||
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Vyberte pre ktorých používate¾ov chcete nainštalova<76> $(^NameDA)."
|
||||
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Vyberte, èi chcete nainštalova<76> program $(^NameDA) iba pre seba alebo pre všetkých používate¾ov tohto poèítaèa. $(^ClickNext)"
|
||||
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Nainštalova<EFBFBD> pre všetkých používate¾ov tohto poèítaèa"
|
||||
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Nainštalova<EFBFBD> iba pre mòa"
|
||||
!endif
|
||||
|
|
@ -97,7 +97,7 @@ LevelInfo::LevelInfo()
|
|||
|
||||
mNetFlags.set( ScopeAlways | Ghostable );
|
||||
|
||||
mAdvancedLightmapSupport = false;
|
||||
mAdvancedLightmapSupport = true;
|
||||
mAccuTextureName = "";
|
||||
mAccuTexture = NULL;
|
||||
|
||||
|
|
@ -163,8 +163,8 @@ void LevelInfo::initPersistFields()
|
|||
addField( "ambientLightBlendCurve", TypeEaseF, Offset( mAmbientLightBlendCurve, LevelInfo ),
|
||||
"Interpolation curve to use for blending from one ambient light color to a different one." );
|
||||
|
||||
addField( "advancedLightmapSupport", TypeBool, Offset( mAdvancedLightmapSupport, LevelInfo ),
|
||||
"Enable expanded support for mixing static and dynamic lighting (more costly)" );
|
||||
//addField( "advancedLightmapSupport", TypeBool, Offset( mAdvancedLightmapSupport, LevelInfo ),
|
||||
// "Enable expanded support for mixing static and dynamic lighting (more costly)" );
|
||||
|
||||
addProtectedField("AccuTexture", TypeStringFilename, Offset(mAccuTextureName, LevelInfo),
|
||||
&_setLevelAccuTexture, &defaultProtectedGetFn, "Accumulation texture.");
|
||||
|
|
|
|||
632
Engine/source/T3D/lighting/IBLUtilities.cpp
Normal file
632
Engine/source/T3D/lighting/IBLUtilities.cpp
Normal file
|
|
@ -0,0 +1,632 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "T3D/lighting/IBLUtilities.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "materials/shaderData.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "gfx/bitmap/imageUtils.h"
|
||||
|
||||
namespace IBLUtilities
|
||||
{
|
||||
void GenerateIrradianceMap(GFXTextureTargetRef renderTarget, GFXCubemapHandle cubemap, GFXCubemapHandle &cubemapOut)
|
||||
{
|
||||
GFXTransformSaver saver;
|
||||
|
||||
GFXStateBlockRef irrStateBlock;
|
||||
|
||||
ShaderData *irrShaderData;
|
||||
GFXShaderRef irrShader = Sim::findObject("IrradianceShader", irrShaderData) ? irrShaderData->getShader() : NULL;
|
||||
if (!irrShader)
|
||||
{
|
||||
Con::errorf("IBLUtilities::GenerateIrradianceMap() - could not find IrradianceShader");
|
||||
return;
|
||||
}
|
||||
|
||||
GFXShaderConstBufferRef irrConsts = irrShader->allocConstBuffer();
|
||||
GFXShaderConstHandle* irrEnvMapSC = irrShader->getShaderConstHandle("$environmentMap");
|
||||
GFXShaderConstHandle* irrFaceSC = irrShader->getShaderConstHandle("$face");
|
||||
|
||||
GFXStateBlockDesc desc;
|
||||
desc.zEnable = false;
|
||||
desc.samplersDefined = true;
|
||||
desc.samplers[0].addressModeU = GFXAddressClamp;
|
||||
desc.samplers[0].addressModeV = GFXAddressClamp;
|
||||
desc.samplers[0].addressModeW = GFXAddressClamp;
|
||||
desc.samplers[0].magFilter = GFXTextureFilterLinear;
|
||||
desc.samplers[0].minFilter = GFXTextureFilterLinear;
|
||||
desc.samplers[0].mipFilter = GFXTextureFilterLinear;
|
||||
|
||||
irrStateBlock = GFX->createStateBlock(desc);
|
||||
|
||||
GFX->pushActiveRenderTarget();
|
||||
GFX->setShader(irrShader);
|
||||
GFX->setShaderConstBuffer(irrConsts);
|
||||
GFX->setStateBlock(irrStateBlock);
|
||||
GFX->setVertexBuffer(NULL);
|
||||
GFX->setCubeTexture(0, cubemap);
|
||||
|
||||
for (U32 i = 0; i < 6; i++)
|
||||
{
|
||||
renderTarget->attachTexture(GFXTextureTarget::Color0, cubemapOut, i);
|
||||
irrConsts->setSafe(irrFaceSC, (S32)i);
|
||||
GFX->setActiveRenderTarget(renderTarget);
|
||||
GFX->clear(GFXClearTarget, LinearColorF::BLACK, 1.0f, 0);
|
||||
GFX->drawPrimitive(GFXTriangleList, 0, 3);
|
||||
renderTarget->resolve();
|
||||
}
|
||||
|
||||
GFX->popActiveRenderTarget();
|
||||
}
|
||||
|
||||
void GenerateAndSaveIrradianceMap(String outputPath, S32 resolution, GFXCubemapHandle cubemap, GFXCubemapHandle &cubemapOut)
|
||||
{
|
||||
if (outputPath.isEmpty())
|
||||
{
|
||||
Con::errorf("IBLUtilities::GenerateAndSaveIrradianceMap - Cannot save to an empty path!");
|
||||
return;
|
||||
}
|
||||
|
||||
GFXTextureTargetRef renderTarget = GFX->allocRenderToTextureTarget(false);
|
||||
|
||||
IBLUtilities::GenerateIrradianceMap(renderTarget, cubemap, cubemapOut);
|
||||
|
||||
//Write it out
|
||||
CubemapSaver::save(cubemapOut, outputPath);
|
||||
|
||||
if (!Platform::isFile(outputPath))
|
||||
{
|
||||
Con::errorf("IBLUtilities::GenerateAndSaveIrradianceMap - Failed to properly save out the baked irradiance!");
|
||||
}
|
||||
}
|
||||
|
||||
void SaveCubeMap(String outputPath, GFXCubemapHandle &cubemap)
|
||||
{
|
||||
if (outputPath.isEmpty())
|
||||
{
|
||||
Con::errorf("IBLUtilities::SaveCubeMap - Cannot save to an empty path!");
|
||||
return;
|
||||
}
|
||||
|
||||
//Write it out
|
||||
CubemapSaver::save(cubemap, outputPath);
|
||||
|
||||
if (!Platform::isFile(outputPath))
|
||||
{
|
||||
Con::errorf("IBLUtilities::SaveCubeMap - Failed to properly save out the baked irradiance!");
|
||||
}
|
||||
}
|
||||
|
||||
void GeneratePrefilterMap(GFXTextureTargetRef renderTarget, GFXCubemapHandle cubemap, U32 mipLevels, GFXCubemapHandle &cubemapOut)
|
||||
{
|
||||
GFXTransformSaver saver;
|
||||
|
||||
ShaderData *prefilterShaderData;
|
||||
GFXShaderRef prefilterShader = Sim::findObject("PrefiterCubemapShader", prefilterShaderData) ? prefilterShaderData->getShader() : NULL;
|
||||
if (!prefilterShader)
|
||||
{
|
||||
Con::errorf("IBLUtilities::GeneratePrefilterMap() - could not find PrefiterCubemapShader");
|
||||
return;
|
||||
}
|
||||
|
||||
GFXShaderConstBufferRef prefilterConsts = prefilterShader->allocConstBuffer();
|
||||
GFXShaderConstHandle* prefilterEnvMapSC = prefilterShader->getShaderConstHandle("$environmentMap");
|
||||
GFXShaderConstHandle* prefilterFaceSC = prefilterShader->getShaderConstHandle("$face");
|
||||
GFXShaderConstHandle* prefilterRoughnessSC = prefilterShader->getShaderConstHandle("$roughness");
|
||||
GFXShaderConstHandle* prefilterMipSizeSC = prefilterShader->getShaderConstHandle("$mipSize");
|
||||
GFXShaderConstHandle* prefilterResolutionSC = prefilterShader->getShaderConstHandle("$resolution");
|
||||
|
||||
GFX->pushActiveRenderTarget();
|
||||
GFX->setShader(prefilterShader);
|
||||
GFX->setShaderConstBuffer(prefilterConsts);
|
||||
GFX->setCubeTexture(0, cubemap);
|
||||
|
||||
U32 prefilterSize = cubemapOut->getSize();
|
||||
|
||||
U32 resolutionSize = prefilterSize;
|
||||
|
||||
for (U32 face = 0; face < 6; face++)
|
||||
{
|
||||
prefilterConsts->setSafe(prefilterFaceSC, (S32)face);
|
||||
prefilterConsts->setSafe(prefilterResolutionSC, (S32)resolutionSize);
|
||||
|
||||
for (U32 mip = 0; mip < mipLevels; mip++)
|
||||
{
|
||||
S32 mipSize = prefilterSize >> mip;
|
||||
F32 roughness = (float)mip / (float)(mipLevels - 1);
|
||||
prefilterConsts->setSafe(prefilterRoughnessSC, roughness);
|
||||
prefilterConsts->setSafe(prefilterMipSizeSC, mipSize);
|
||||
U32 size = prefilterSize * mPow(0.5f, mip);
|
||||
renderTarget->attachTexture(GFXTextureTarget::Color0, cubemapOut, face, mip);
|
||||
GFX->setActiveRenderTarget(renderTarget, false);//we set the viewport ourselves
|
||||
GFX->setViewport(RectI(0, 0, size, size));
|
||||
GFX->clear(GFXClearTarget, LinearColorF::BLACK, 1.0f, 0);
|
||||
GFX->drawPrimitive(GFXTriangleList, 0, 3);
|
||||
renderTarget->resolve();
|
||||
}
|
||||
}
|
||||
|
||||
GFX->popActiveRenderTarget();
|
||||
}
|
||||
|
||||
void GenerateAndSavePrefilterMap(String outputPath, S32 resolution, GFXCubemapHandle cubemap, U32 mipLevels, GFXCubemapHandle &cubemapOut)
|
||||
{
|
||||
if (outputPath.isEmpty())
|
||||
{
|
||||
Con::errorf("IBLUtilities::GenerateAndSavePrefilterMap - Cannot save to an empty path!");
|
||||
return;
|
||||
}
|
||||
|
||||
GFXTextureTargetRef renderTarget = GFX->allocRenderToTextureTarget(false);
|
||||
|
||||
IBLUtilities::GeneratePrefilterMap(renderTarget, cubemap, mipLevels, cubemapOut);
|
||||
|
||||
//Write it out
|
||||
CubemapSaver::save(cubemapOut, outputPath);
|
||||
|
||||
if (!Platform::isFile(outputPath))
|
||||
{
|
||||
Con::errorf("IBLUtilities::GenerateAndSavePrefilterMap - Failed to properly save out the baked irradiance!");
|
||||
}
|
||||
}
|
||||
|
||||
void bakeReflection(String outputPath, S32 resolution)
|
||||
{
|
||||
//GFXDEBUGEVENT_SCOPE(ReflectionProbe_Bake, ColorI::WHITE);
|
||||
|
||||
/*PostEffect *preCapture = dynamic_cast<PostEffect*>(Sim::findObject("AL_PreCapture"));
|
||||
PostEffect *deferredShading = dynamic_cast<PostEffect*>(Sim::findObject("AL_DeferredShading"));
|
||||
if (preCapture)
|
||||
preCapture->enable();
|
||||
if (deferredShading)
|
||||
deferredShading->disable();
|
||||
|
||||
//if (mReflectionModeType == StaticCubemap || mReflectionModeType == BakedCubemap || mReflectionModeType == SkyLight)
|
||||
{
|
||||
if (!mCubemap)
|
||||
{
|
||||
mCubemap = new CubemapData();
|
||||
mCubemap->registerObject();
|
||||
}
|
||||
}
|
||||
|
||||
if (mReflectionModeType == DynamicCubemap && mDynamicCubemap.isNull())
|
||||
{
|
||||
//mCubemap->createMap();
|
||||
mDynamicCubemap = GFX->createCubemap();
|
||||
mDynamicCubemap->initDynamic(resolution, GFXFormatR8G8B8);
|
||||
}
|
||||
else if (mReflectionModeType != DynamicCubemap)
|
||||
{
|
||||
if (mReflectionPath.isEmpty() || !mPersistentId)
|
||||
{
|
||||
if (!mPersistentId)
|
||||
mPersistentId = getOrCreatePersistentId();
|
||||
|
||||
mReflectionPath = outputPath.c_str();
|
||||
|
||||
mProbeUniqueID = std::to_string(mPersistentId->getUUID().getHash()).c_str();
|
||||
}
|
||||
}
|
||||
|
||||
bool validCubemap = true;
|
||||
|
||||
// Save the current transforms so we can restore
|
||||
// it for child control rendering below.
|
||||
GFXTransformSaver saver;
|
||||
|
||||
//bool saveEditingMission = gEditingMission;
|
||||
//gEditingMission = false;
|
||||
|
||||
//Set this to true to use the prior method where it goes through the SPT_Reflect path for the bake
|
||||
bool probeRenderState = ReflectionProbe::smRenderReflectionProbes;
|
||||
ReflectionProbe::smRenderReflectionProbes = false;
|
||||
for (U32 i = 0; i < 6; ++i)
|
||||
{
|
||||
GFXTexHandle blendTex;
|
||||
blendTex.set(resolution, resolution, GFXFormatR8G8B8A8, &GFXRenderTargetProfile, "");
|
||||
|
||||
GFXTextureTargetRef mBaseTarget = GFX->allocRenderToTextureTarget();
|
||||
|
||||
GFX->clearTextureStateImmediate(0);
|
||||
if (mReflectionModeType == DynamicCubemap)
|
||||
mBaseTarget->attachTexture(GFXTextureTarget::Color0, mDynamicCubemap, i);
|
||||
else
|
||||
mBaseTarget->attachTexture(GFXTextureTarget::Color0, blendTex);
|
||||
|
||||
// Standard view that will be overridden below.
|
||||
VectorF vLookatPt(0.0f, 0.0f, 0.0f), vUpVec(0.0f, 0.0f, 0.0f), vRight(0.0f, 0.0f, 0.0f);
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: // D3DCUBEMAP_FACE_POSITIVE_X:
|
||||
vLookatPt = VectorF(1.0f, 0.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case 1: // D3DCUBEMAP_FACE_NEGATIVE_X:
|
||||
vLookatPt = VectorF(-1.0f, 0.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case 2: // D3DCUBEMAP_FACE_POSITIVE_Y:
|
||||
vLookatPt = VectorF(0.0f, 1.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 0.0f, -1.0f);
|
||||
break;
|
||||
case 3: // D3DCUBEMAP_FACE_NEGATIVE_Y:
|
||||
vLookatPt = VectorF(0.0f, -1.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 0.0f, 1.0f);
|
||||
break;
|
||||
case 4: // D3DCUBEMAP_FACE_POSITIVE_Z:
|
||||
vLookatPt = VectorF(0.0f, 0.0f, 1.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case 5: // D3DCUBEMAP_FACE_NEGATIVE_Z:
|
||||
vLookatPt = VectorF(0.0f, 0.0f, -1.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
}
|
||||
|
||||
// create camera matrix
|
||||
VectorF cross = mCross(vUpVec, vLookatPt);
|
||||
cross.normalizeSafe();
|
||||
|
||||
MatrixF matView(true);
|
||||
matView.setColumn(0, cross);
|
||||
matView.setColumn(1, vLookatPt);
|
||||
matView.setColumn(2, vUpVec);
|
||||
matView.setPosition(getPosition());
|
||||
matView.inverse();
|
||||
|
||||
// set projection to 90 degrees vertical and horizontal
|
||||
F32 left, right, top, bottom;
|
||||
F32 nearPlane = 0.01f;
|
||||
F32 farDist = 1000.f;
|
||||
|
||||
MathUtils::makeFrustum(&left, &right, &top, &bottom, M_HALFPI_F, 1.0f, nearPlane);
|
||||
Frustum frustum(false, left, right, top, bottom, nearPlane, farDist);
|
||||
|
||||
renderFrame(&mBaseTarget, matView, frustum, StaticObjectType | StaticShapeObjectType & EDITOR_RENDER_TYPEMASK, gCanvasClearColor);
|
||||
|
||||
mBaseTarget->resolve();
|
||||
|
||||
mCubemap->setCubeFaceTexture(i, blendTex);
|
||||
}
|
||||
|
||||
if (mReflectionModeType != DynamicCubemap && validCubemap)
|
||||
{
|
||||
if (mCubemap->mCubemap)
|
||||
mCubemap->updateFaces();
|
||||
else
|
||||
mCubemap->createMap();
|
||||
|
||||
char fileName[256];
|
||||
dSprintf(fileName, 256, "%s%s.DDS", mReflectionPath.c_str(), mProbeUniqueID.c_str());
|
||||
|
||||
CubemapSaver::save(mCubemap->mCubemap, fileName);
|
||||
|
||||
if (!Platform::isFile(fileName))
|
||||
{
|
||||
validCubemap = false; //if we didn't save right, just
|
||||
Con::errorf("Failed to properly save out the skylight baked cubemap!");
|
||||
}
|
||||
|
||||
mDirty = false;
|
||||
}
|
||||
|
||||
//calculateSHTerms();
|
||||
|
||||
ReflectionProbe::smRenderReflectionProbes = probeRenderState;
|
||||
setMaskBits(-1);
|
||||
|
||||
if (preCapture)
|
||||
preCapture->disable();
|
||||
if (deferredShading)
|
||||
deferredShading->enable();*/
|
||||
}
|
||||
|
||||
LinearColorF decodeSH(Point3F normal, const LinearColorF SHTerms[9], const F32 SHConstants[5])
|
||||
{
|
||||
float x = normal.x;
|
||||
float y = normal.y;
|
||||
float z = normal.z;
|
||||
|
||||
LinearColorF l00 = SHTerms[0];
|
||||
|
||||
LinearColorF l10 = SHTerms[1];
|
||||
LinearColorF l11 = SHTerms[2];
|
||||
LinearColorF l12 = SHTerms[3];
|
||||
|
||||
LinearColorF l20 = SHTerms[4];
|
||||
LinearColorF l21 = SHTerms[5];
|
||||
LinearColorF l22 = SHTerms[6];
|
||||
LinearColorF l23 = SHTerms[7];
|
||||
LinearColorF l24 = SHTerms[8];
|
||||
|
||||
LinearColorF result = (
|
||||
l00 * SHConstants[0] +
|
||||
|
||||
l12 * SHConstants[1] * x +
|
||||
l10 * SHConstants[1] * y +
|
||||
l11 * SHConstants[1] * z +
|
||||
|
||||
l20 * SHConstants[2] * x*y +
|
||||
l21 * SHConstants[2] * y*z +
|
||||
l22 * SHConstants[3] * (3.0*z*z - 1.0) +
|
||||
l23 * SHConstants[2] * x*z +
|
||||
l24 * SHConstants[4] * (x*x - y * y)
|
||||
);
|
||||
|
||||
return LinearColorF(mMax(result.red, 0), mMax(result.green, 0), mMax(result.blue, 0));
|
||||
}
|
||||
|
||||
MatrixF getSideMatrix(U32 side)
|
||||
{
|
||||
// Standard view that will be overridden below.
|
||||
VectorF vLookatPt(0.0f, 0.0f, 0.0f), vUpVec(0.0f, 0.0f, 0.0f), vRight(0.0f, 0.0f, 0.0f);
|
||||
|
||||
switch (side)
|
||||
{
|
||||
case 0: // D3DCUBEMAP_FACE_POSITIVE_X:
|
||||
vLookatPt = VectorF(1.0f, 0.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case 1: // D3DCUBEMAP_FACE_NEGATIVE_X:
|
||||
vLookatPt = VectorF(-1.0f, 0.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case 2: // D3DCUBEMAP_FACE_POSITIVE_Y:
|
||||
vLookatPt = VectorF(0.0f, 1.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 0.0f, -1.0f);
|
||||
break;
|
||||
case 3: // D3DCUBEMAP_FACE_NEGATIVE_Y:
|
||||
vLookatPt = VectorF(0.0f, -1.0f, 0.0f);
|
||||
vUpVec = VectorF(0.0f, 0.0f, 1.0f);
|
||||
break;
|
||||
case 4: // D3DCUBEMAP_FACE_POSITIVE_Z:
|
||||
vLookatPt = VectorF(0.0f, 0.0f, 1.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case 5: // D3DCUBEMAP_FACE_NEGATIVE_Z:
|
||||
vLookatPt = VectorF(0.0f, 0.0f, -1.0f);
|
||||
vUpVec = VectorF(0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
}
|
||||
|
||||
// create camera matrix
|
||||
VectorF cross = mCross(vUpVec, vLookatPt);
|
||||
cross.normalizeSafe();
|
||||
|
||||
MatrixF rotMat(true);
|
||||
rotMat.setColumn(0, cross);
|
||||
rotMat.setColumn(1, vLookatPt);
|
||||
rotMat.setColumn(2, vUpVec);
|
||||
//rotMat.inverse();
|
||||
|
||||
return rotMat;
|
||||
}
|
||||
|
||||
F32 harmonics(U32 termId, Point3F normal)
|
||||
{
|
||||
F32 x = normal.x;
|
||||
F32 y = normal.y;
|
||||
F32 z = normal.z;
|
||||
|
||||
switch (termId)
|
||||
{
|
||||
case 0:
|
||||
return 1.0;
|
||||
case 1:
|
||||
return y;
|
||||
case 2:
|
||||
return z;
|
||||
case 3:
|
||||
return x;
|
||||
case 4:
|
||||
return x * y;
|
||||
case 5:
|
||||
return y * z;
|
||||
case 6:
|
||||
return 3.0*z*z - 1.0;
|
||||
case 7:
|
||||
return x * z;
|
||||
default:
|
||||
return x * x - y * y;
|
||||
}
|
||||
}
|
||||
|
||||
LinearColorF sampleSide(GBitmap* cubeFaceBitmaps[6], const U32& cubemapResolution, const U32& termindex, const U32& sideIndex)
|
||||
{
|
||||
MatrixF sideRot = getSideMatrix(sideIndex);
|
||||
|
||||
LinearColorF result = LinearColorF::ZERO;
|
||||
F32 divider = 0;
|
||||
|
||||
for (int y = 0; y<cubemapResolution; y++)
|
||||
{
|
||||
for (int x = 0; x<cubemapResolution; x++)
|
||||
{
|
||||
Point2F sidecoord = ((Point2F(x, y) + Point2F(0.5, 0.5)) / Point2F(cubemapResolution, cubemapResolution))*2.0 - Point2F(1.0, 1.0);
|
||||
Point3F normal = Point3F(sidecoord.x, sidecoord.y, -1.0);
|
||||
normal.normalize();
|
||||
|
||||
F32 minBrightness = Con::getFloatVariable("$pref::GI::Cubemap_Sample_MinBrightness", 0.001f);
|
||||
|
||||
LinearColorF texel = cubeFaceBitmaps[sideIndex]->sampleTexel(y, x);
|
||||
texel = LinearColorF(mMax(texel.red, minBrightness), mMax(texel.green, minBrightness), mMax(texel.blue, minBrightness)) * Con::getFloatVariable("$pref::GI::Cubemap_Gain", 1.5);
|
||||
|
||||
Point3F dir;
|
||||
sideRot.mulP(normal, &dir);
|
||||
|
||||
result += texel * harmonics(termindex, dir) * -normal.z;
|
||||
divider += -normal.z;
|
||||
}
|
||||
}
|
||||
|
||||
result /= divider;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
//SH Calculations
|
||||
// From http://sunandblackcat.com/tipFullView.php?l=eng&topicid=32&topic=Spherical-Harmonics-From-Cube-Texture
|
||||
// With shader decode logic from https://github.com/nicknikolov/cubemap-sh
|
||||
void calculateSHTerms(GFXCubemapHandle cubemap, LinearColorF SHTerms[9], F32 SHConstants[5])
|
||||
{
|
||||
if (!cubemap)
|
||||
return;
|
||||
|
||||
const VectorF cubemapFaceNormals[6] =
|
||||
{
|
||||
// D3DCUBEMAP_FACE_POSITIVE_X:
|
||||
VectorF(1.0f, 0.0f, 0.0f),
|
||||
// D3DCUBEMAP_FACE_NEGATIVE_X:
|
||||
VectorF(-1.0f, 0.0f, 0.0f),
|
||||
// D3DCUBEMAP_FACE_POSITIVE_Y:
|
||||
VectorF(0.0f, 1.0f, 0.0f),
|
||||
// D3DCUBEMAP_FACE_NEGATIVE_Y:
|
||||
VectorF(0.0f, -1.0f, 0.0f),
|
||||
// D3DCUBEMAP_FACE_POSITIVE_Z:
|
||||
VectorF(0.0f, 0.0f, 1.0f),
|
||||
// D3DCUBEMAP_FACE_NEGATIVE_Z:
|
||||
VectorF(0.0f, 0.0f, -1.0f),
|
||||
};
|
||||
|
||||
U32 cubemapResolution = cubemap->getSize();
|
||||
|
||||
GBitmap* cubeFaceBitmaps[6];
|
||||
|
||||
for (U32 i = 0; i < 6; i++)
|
||||
{
|
||||
cubeFaceBitmaps[i] = new GBitmap(cubemapResolution, cubemapResolution, false, GFXFormatR16G16B16A16F);
|
||||
}
|
||||
|
||||
//If we fail to parse the cubemap for whatever reason, we really can't continue
|
||||
if (!CubemapSaver::getBitmaps(cubemap, GFXFormatR8G8B8A8, cubeFaceBitmaps))
|
||||
return;
|
||||
|
||||
//Set up our constants
|
||||
F32 L0 = Con::getFloatVariable("$pref::GI::SH_Term_L0", 1.0f);
|
||||
F32 L1 = Con::getFloatVariable("$pref::GI::SH_Term_L1", 1.8f);
|
||||
F32 L2 = Con::getFloatVariable("$pref::GI::SH_Term_L2", 0.83f);
|
||||
F32 L2m2_L2m1_L21 = Con::getFloatVariable("$pref::GI::SH_Term_L2m2", 2.9f);
|
||||
F32 L20 = Con::getFloatVariable("$pref::GI::SH_Term_L20", 0.58f);
|
||||
F32 L22 = Con::getFloatVariable("$pref::GI::SH_Term_L22", 1.1f);
|
||||
|
||||
SHConstants[0] = L0;
|
||||
SHConstants[1] = L1;
|
||||
SHConstants[2] = L2 * L2m2_L2m1_L21;
|
||||
SHConstants[3] = L2 * L20;
|
||||
SHConstants[4] = L2 * L22;
|
||||
|
||||
for (U32 i = 0; i < 9; i++)
|
||||
{
|
||||
//Clear it, just to be sure
|
||||
SHTerms[i] = LinearColorF(0.f, 0.f, 0.f);
|
||||
|
||||
//Now, encode for each side
|
||||
SHTerms[i] = sampleSide(cubeFaceBitmaps, cubemapResolution, i, 0); //POS_X
|
||||
SHTerms[i] += sampleSide(cubeFaceBitmaps, cubemapResolution, i, 1); //NEG_X
|
||||
SHTerms[i] += sampleSide(cubeFaceBitmaps, cubemapResolution, i, 2); //POS_Y
|
||||
SHTerms[i] += sampleSide(cubeFaceBitmaps, cubemapResolution, i, 3); //NEG_Y
|
||||
SHTerms[i] += sampleSide(cubeFaceBitmaps, cubemapResolution, i, 4); //POS_Z
|
||||
SHTerms[i] += sampleSide(cubeFaceBitmaps, cubemapResolution, i, 5); //NEG_Z
|
||||
|
||||
//Average
|
||||
SHTerms[i] /= 6;
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < 6; i++)
|
||||
SAFE_DELETE(cubeFaceBitmaps[i]);
|
||||
|
||||
/*bool mExportSHTerms = false;
|
||||
if (mExportSHTerms)
|
||||
{
|
||||
for (U32 f = 0; f < 6; f++)
|
||||
{
|
||||
char fileName[256];
|
||||
dSprintf(fileName, 256, "%s%s_DecodedFaces_%d.png", mReflectionPath.c_str(),
|
||||
mProbeUniqueID.c_str(), f);
|
||||
|
||||
LinearColorF color = decodeSH(cubemapFaceNormals[f]);
|
||||
|
||||
FileStream stream;
|
||||
if (stream.open(fileName, Torque::FS::File::Write))
|
||||
{
|
||||
GBitmap bitmap(mCubemapResolution, mCubemapResolution, false, GFXFormatR8G8B8);
|
||||
|
||||
bitmap.fill(color.toColorI());
|
||||
|
||||
bitmap.writeBitmap("png", stream);
|
||||
}
|
||||
}
|
||||
|
||||
for (U32 f = 0; f < 9; f++)
|
||||
{
|
||||
char fileName[256];
|
||||
dSprintf(fileName, 256, "%s%s_SHTerms_%d.png", mReflectionPath.c_str(),
|
||||
mProbeUniqueID.c_str(), f);
|
||||
|
||||
LinearColorF color = mProbeInfo->SHTerms[f];
|
||||
|
||||
FileStream stream;
|
||||
if (stream.open(fileName, Torque::FS::File::Write))
|
||||
{
|
||||
GBitmap bitmap(mCubemapResolution, mCubemapResolution, false, GFXFormatR8G8B8);
|
||||
|
||||
bitmap.fill(color.toColorI());
|
||||
|
||||
bitmap.writeBitmap("png", stream);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
F32 areaElement(F32 x, F32 y)
|
||||
{
|
||||
return mAtan2(x * y, (F32)mSqrt(x * x + y * y + 1.0));
|
||||
}
|
||||
|
||||
F32 texelSolidAngle(F32 aU, F32 aV, U32 width, U32 height)
|
||||
{
|
||||
// transform from [0..res - 1] to [- (1 - 1 / res) .. (1 - 1 / res)]
|
||||
// ( 0.5 is for texel center addressing)
|
||||
const F32 U = (2.0 * (aU + 0.5) / width) - 1.0;
|
||||
const F32 V = (2.0 * (aV + 0.5) / height) - 1.0;
|
||||
|
||||
// shift from a demi texel, mean 1.0 / size with U and V in [-1..1]
|
||||
const F32 invResolutionW = 1.0 / width;
|
||||
const F32 invResolutionH = 1.0 / height;
|
||||
|
||||
// U and V are the -1..1 texture coordinate on the current face.
|
||||
// get projected area for this texel
|
||||
const F32 x0 = U - invResolutionW;
|
||||
const F32 y0 = V - invResolutionH;
|
||||
const F32 x1 = U + invResolutionW;
|
||||
const F32 y1 = V + invResolutionH;
|
||||
const F32 angle = areaElement(x0, y0) - areaElement(x0, y1) - areaElement(x1, y0) + areaElement(x1, y1);
|
||||
|
||||
return angle;
|
||||
}
|
||||
};
|
||||
70
Engine/source/T3D/lighting/IBLUtilities.h
Normal file
70
Engine/source/T3D/lighting/IBLUtilities.h
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef IBL_UTILS_H_
|
||||
#define IBL_UTILS_H_
|
||||
|
||||
#ifndef _GFXTARGET_H_
|
||||
#include "gfx/gfxTarget.h"
|
||||
#endif
|
||||
|
||||
#ifndef _GFXCUBEMAP_H_
|
||||
#include "gfx/gfxCubemap.h"
|
||||
#endif
|
||||
|
||||
#ifndef _COLOR_H_
|
||||
#include "core/color.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace IBLUtilities
|
||||
{
|
||||
void GenerateIrradianceMap(GFXTextureTargetRef renderTarget, GFXCubemapHandle cubemap, GFXCubemapHandle &cubemapOut);
|
||||
void GenerateAndSaveIrradianceMap(String outputPath, S32 resolution, GFXCubemapHandle cubemap, GFXCubemapHandle &cubemapOut);
|
||||
|
||||
void GeneratePrefilterMap(GFXTextureTargetRef renderTarget, GFXCubemapHandle cubemap, U32 mipLevels, GFXCubemapHandle &cubemapOut);
|
||||
void GenerateAndSavePrefilterMap(String outputPath, S32 resolution, GFXCubemapHandle cubemap, U32 mipLevels, GFXCubemapHandle &cubemapOut);
|
||||
|
||||
void SaveCubeMap(String outputPath, GFXCubemapHandle &cubemap);
|
||||
|
||||
void bakeReflection(String outputPath, S32 resolution);
|
||||
|
||||
LinearColorF decodeSH(Point3F normal, const LinearColorF SHTerms[9], const F32 SHConstants[5]);
|
||||
|
||||
MatrixF getSideMatrix(U32 side);
|
||||
|
||||
F32 harmonics(U32 termId, Point3F normal);
|
||||
|
||||
LinearColorF sampleSide(GBitmap* cubeFaceBitmaps[6], const U32& cubemapResolution, const U32& termindex, const U32& sideIndex);
|
||||
|
||||
//
|
||||
//SH Calculations
|
||||
// From http://sunandblackcat.com/tipFullView.php?l=eng&topicid=32&topic=Spherical-Harmonics-From-Cube-Texture
|
||||
// With shader decode logic from https://github.com/nicknikolov/cubemap-sh
|
||||
void calculateSHTerms(GFXCubemapHandle cubemap, LinearColorF SHTerms[9], F32 SHConstants[5]);
|
||||
|
||||
F32 texelSolidAngle(F32 aU, F32 aV, U32 width, U32 height);
|
||||
|
||||
F32 areaElement(F32 x, F32 y);
|
||||
};
|
||||
|
||||
#endif
|
||||
180
Engine/source/T3D/lighting/boxEnvironmentProbe.cpp
Normal file
180
Engine/source/T3D/lighting/boxEnvironmentProbe.cpp
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "T3D/lighting/boxEnvironmentProbe.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "scene/sceneRenderState.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "materials/baseMatInstance.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "gfx/gfxDebugEvent.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "core/fileObject.h"
|
||||
#include "core/resourceManager.h"
|
||||
#include "console/simPersistId.h"
|
||||
#include "T3D/gameFunctions.h"
|
||||
#include "postFx/postEffect.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
|
||||
#include "math/util/sphereMesh.h"
|
||||
#include "materials/materialManager.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
|
||||
#include "materials/materialFeatureTypes.h"
|
||||
|
||||
#include "materials/shaderData.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
|
||||
#include "gfx/bitmap/imageUtils.h"
|
||||
|
||||
#include "T3D/lighting/IBLUtilities.h"
|
||||
|
||||
extern bool gEditingMission;
|
||||
extern ColorI gCanvasClearColor;
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(BoxEnvironmentProbe);
|
||||
|
||||
ConsoleDocClass(BoxEnvironmentProbe,
|
||||
"@brief An example scene object which renders a mesh.\n\n"
|
||||
"This class implements a basic SceneObject that can exist in the world at a "
|
||||
"3D position and render itself. There are several valid ways to render an "
|
||||
"object in Torque. This class implements the preferred rendering method which "
|
||||
"is to submit a MeshRenderInst along with a Material, vertex buffer, "
|
||||
"primitive buffer, and transform and allow the RenderMeshMgr handle the "
|
||||
"actual setup and rendering for you.\n\n"
|
||||
"See the C++ code for implementation details.\n\n"
|
||||
"@ingroup Examples\n");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object setup and teardown
|
||||
//-----------------------------------------------------------------------------
|
||||
BoxEnvironmentProbe::BoxEnvironmentProbe() : ReflectionProbe()
|
||||
{
|
||||
mCaptureMask = REFLECTION_PROBE_CAPTURE_TYPEMASK;
|
||||
mProbeShapeType = ProbeRenderInst::Box;
|
||||
mAtten = 0.0;
|
||||
}
|
||||
|
||||
BoxEnvironmentProbe::~BoxEnvironmentProbe()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
//-----------------------------------------------------------------------------
|
||||
void BoxEnvironmentProbe::initPersistFields()
|
||||
{
|
||||
// SceneObject already handles exposing the transform
|
||||
Parent::initPersistFields();
|
||||
|
||||
addField("attenuation", TypeF32, Offset(mAtten, BoxEnvironmentProbe), "falloff percent");
|
||||
|
||||
removeField("radius");
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::inspectPostApply()
|
||||
{
|
||||
Parent::inspectPostApply();
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Flag the network mask to send the updates
|
||||
// to the client object
|
||||
setMaskBits(-1);
|
||||
}
|
||||
|
||||
bool BoxEnvironmentProbe::onAdd()
|
||||
{
|
||||
if (!Parent::onAdd())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::onRemove()
|
||||
{
|
||||
Parent::onRemove();
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::setTransform(const MatrixF & mat)
|
||||
{
|
||||
// Let SceneObject handle all of the matrix manipulation
|
||||
Parent::setTransform(mat);
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Dirty our network mask so that the new transform gets
|
||||
// transmitted to the client object
|
||||
setMaskBits(TransformMask);
|
||||
}
|
||||
|
||||
U32 BoxEnvironmentProbe::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
|
||||
{
|
||||
// Allow the Parent to get a crack at writing its info
|
||||
U32 retMask = Parent::packUpdate(conn, mask, stream);
|
||||
|
||||
if (stream->writeFlag(mask & UpdateMask))
|
||||
{
|
||||
stream->write(mAtten);
|
||||
}
|
||||
|
||||
return retMask;
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
||||
{
|
||||
// Let the Parent read any info it sent
|
||||
Parent::unpackUpdate(conn, stream);
|
||||
|
||||
if (stream->readFlag()) // UpdateMask
|
||||
{
|
||||
stream->read(&mAtten);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void BoxEnvironmentProbe::updateProbeParams()
|
||||
{
|
||||
Parent::updateProbeParams();
|
||||
|
||||
mProbeInfo->mProbeShapeType = ProbeRenderInst::Box;
|
||||
mProbeInfo->mAtten = mAtten;
|
||||
|
||||
PROBEMGR->updateProbes();
|
||||
|
||||
updateCubemaps();
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat)
|
||||
{
|
||||
Parent::setPreviewMatParameters(renderState, mat);
|
||||
}
|
||||
116
Engine/source/T3D/lighting/boxEnvironmentProbe.h
Normal file
116
Engine/source/T3D/lighting/boxEnvironmentProbe.h
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef BOX_ENVIRONMENT_PROBE_H
|
||||
#define BOX_ENVIRONMENT_PROBE_H
|
||||
|
||||
#ifndef REFLECTIONPROBE_H
|
||||
#include "T3D/lighting/reflectionProbe.h"
|
||||
#endif
|
||||
#ifndef _GFXVERTEXBUFFER_H_
|
||||
#include "gfx/gfxVertexBuffer.h"
|
||||
#endif
|
||||
#ifndef _GFXPRIMITIVEBUFFER_H_
|
||||
#include "gfx/gfxPrimitiveBuffer.h"
|
||||
#endif
|
||||
#ifndef _TSSHAPEINSTANCE_H_
|
||||
#include "ts/tsShapeInstance.h"
|
||||
#endif
|
||||
#include "lighting/lightInfo.h"
|
||||
|
||||
#ifndef _RENDERPASSMANAGER_H_
|
||||
#include "renderInstance/renderPassManager.h"
|
||||
#endif
|
||||
|
||||
class BaseMatInstance;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This class implements a basic SceneObject that can exist in the world at a
|
||||
// 3D position and render itself. There are several valid ways to render an
|
||||
// object in Torque. This class implements the preferred rendering method which
|
||||
// is to submit a MeshRenderInst along with a Material, vertex buffer,
|
||||
// primitive buffer, and transform and allow the RenderMeshMgr handle the
|
||||
// actual setup and rendering for you.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class BoxEnvironmentProbe : public ReflectionProbe
|
||||
{
|
||||
typedef ReflectionProbe Parent;
|
||||
F32 mAtten;
|
||||
private:
|
||||
|
||||
//Debug rendering
|
||||
static bool smRenderPreviewProbes;
|
||||
|
||||
public:
|
||||
BoxEnvironmentProbe();
|
||||
virtual ~BoxEnvironmentProbe();
|
||||
|
||||
// Declare this object as a ConsoleObject so that we can
|
||||
// instantiate it into the world and network it
|
||||
DECLARE_CONOBJECT(BoxEnvironmentProbe);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
// Since there is always a server and a client object in Torque and we
|
||||
// actually edit the server object we need to implement some basic
|
||||
// networking functions
|
||||
//--------------------------------------------------------------------------
|
||||
// Set up any fields that we want to be editable (like position)
|
||||
static void initPersistFields();
|
||||
|
||||
// Allows the object to update its editable settings
|
||||
// from the server object to the client
|
||||
virtual void inspectPostApply();
|
||||
|
||||
// Handle when we are added to the scene and removed from the scene
|
||||
bool onAdd();
|
||||
void onRemove();
|
||||
|
||||
// Override this so that we can dirty the network flag when it is called
|
||||
void setTransform(const MatrixF &mat);
|
||||
|
||||
// This function handles sending the relevant data from the server
|
||||
// object to the client object
|
||||
U32 packUpdate(NetConnection *conn, U32 mask, BitStream *stream);
|
||||
// This function handles receiving relevant data from the server
|
||||
// object and applying it to the client object
|
||||
void unpackUpdate(NetConnection *conn, BitStream *stream);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
// Torque utilizes a "batch" rendering system. This means that it builds a
|
||||
// list of objects that need to render (via RenderInst's) and then renders
|
||||
// them all in one batch. This allows it to optimized on things like
|
||||
// minimizing texture, state, and shader switching by grouping objects that
|
||||
// use the same Materials.
|
||||
//--------------------------------------------------------------------------
|
||||
virtual void updateProbeParams();
|
||||
|
||||
// This is the function that allows this object to submit itself for rendering
|
||||
//void prepRenderImage(SceneRenderState *state);
|
||||
|
||||
void setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat);
|
||||
};
|
||||
|
||||
#endif // BOX_ENVIRONMENT_PROBE_H
|
||||
968
Engine/source/T3D/lighting/reflectionProbe.cpp
Normal file
968
Engine/source/T3D/lighting/reflectionProbe.cpp
Normal file
|
|
@ -0,0 +1,968 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "T3D/lighting/reflectionProbe.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "scene/sceneRenderState.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "materials/baseMatInstance.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "gfx/gfxDebugEvent.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "core/fileObject.h"
|
||||
#include "core/resourceManager.h"
|
||||
#include "console/simPersistId.h"
|
||||
#include "T3D/gameFunctions.h"
|
||||
#include "postFx/postEffect.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
|
||||
#include "math/util/sphereMesh.h"
|
||||
#include "materials/materialManager.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
|
||||
#include "materials/materialFeatureTypes.h"
|
||||
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
#include "T3D/lighting/IBLUtilities.h"
|
||||
|
||||
#include "scene/reflector.h"
|
||||
|
||||
extern bool gEditingMission;
|
||||
extern ColorI gCanvasClearColor;
|
||||
bool ReflectionProbe::smRenderPreviewProbes = true;
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(ReflectionProbe);
|
||||
|
||||
ConsoleDocClass(ReflectionProbe,
|
||||
"@brief An example scene object which renders a mesh.\n\n"
|
||||
"This class implements a basic SceneObject that can exist in the world at a "
|
||||
"3D position and render itself. There are several valid ways to render an "
|
||||
"object in Torque. This class implements the preferred rendering method which "
|
||||
"is to submit a MeshRenderInst along with a Material, vertex buffer, "
|
||||
"primitive buffer, and transform and allow the RenderMeshMgr handle the "
|
||||
"actual setup and rendering for you.\n\n"
|
||||
"See the C++ code for implementation details.\n\n"
|
||||
"@ingroup Examples\n");
|
||||
|
||||
ImplementEnumType(ReflectProbeType,
|
||||
"Type of mesh data available in a shape.\n"
|
||||
"@ingroup gameObjects")
|
||||
{ ProbeRenderInst::Sphere, "Sphere", "Sphere shaped" },
|
||||
{ ProbeRenderInst::Box, "Box", "Box shape" }
|
||||
EndImplementEnumType;
|
||||
|
||||
ImplementEnumType(ReflectionModeEnum,
|
||||
"Type of mesh data available in a shape.\n"
|
||||
"@ingroup gameObjects")
|
||||
{ ReflectionProbe::NoReflection, "No Reflections", "This probe does not provide any local reflection data"},
|
||||
{ ReflectionProbe::StaticCubemap, "Static Cubemap", "Uses a static CubemapData" },
|
||||
{ ReflectionProbe::BakedCubemap, "Baked Cubemap", "Uses a cubemap baked from the probe's current position" },
|
||||
//{ ReflectionProbe::DynamicCubemap, "Dynamic Cubemap", "Uses a cubemap baked from the probe's current position, updated at a set rate" },
|
||||
EndImplementEnumType;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object setup and teardown
|
||||
//-----------------------------------------------------------------------------
|
||||
ReflectionProbe::ReflectionProbe()
|
||||
{
|
||||
// Flag this object so that it will always
|
||||
// be sent across the network to clients
|
||||
mNetFlags.set(Ghostable | ScopeAlways);
|
||||
|
||||
mTypeMask = LightObjectType | MarkerObjectType;
|
||||
|
||||
mProbeShapeType = ProbeRenderInst::Box;
|
||||
|
||||
mReflectionModeType = BakedCubemap;
|
||||
|
||||
mEnabled = true;
|
||||
mBake = false;
|
||||
mDirty = false;
|
||||
|
||||
mRadius = 10;
|
||||
mObjScale = Point3F::One * 10;
|
||||
mProbeRefScale = Point3F::One*10;
|
||||
|
||||
mUseHDRCaptures = true;
|
||||
|
||||
mStaticCubemap = NULL;
|
||||
mProbeUniqueID = "";
|
||||
|
||||
mEditorShapeInst = NULL;
|
||||
mEditorShape = NULL;
|
||||
|
||||
mRefreshRateMS = 200;
|
||||
mDynamicLastBakeMS = 0;
|
||||
|
||||
mMaxDrawDistance = 75;
|
||||
|
||||
mResourcesCreated = false;
|
||||
|
||||
mProbeInfo = nullptr;
|
||||
|
||||
mPrefilterSize = 64;
|
||||
mPrefilterMipLevels = mLog2(F32(mPrefilterSize));
|
||||
mPrefilterMap = nullptr;
|
||||
mIrridianceMap = nullptr;
|
||||
|
||||
mProbeRefOffset = Point3F::Zero;
|
||||
mEditPosOffset = false;
|
||||
|
||||
mProbeInfoIdx = -1;
|
||||
|
||||
mCaptureMask = REFLECTION_PROBE_CAPTURE_TYPEMASK;
|
||||
}
|
||||
|
||||
ReflectionProbe::~ReflectionProbe()
|
||||
{
|
||||
if (mEditorShapeInst)
|
||||
SAFE_DELETE(mEditorShapeInst);
|
||||
|
||||
if (mProbeInfo)
|
||||
SAFE_DELETE(mProbeInfo);
|
||||
|
||||
if (mReflectionModeType != StaticCubemap && mStaticCubemap)
|
||||
mStaticCubemap->deleteObject();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
//-----------------------------------------------------------------------------
|
||||
void ReflectionProbe::initPersistFields()
|
||||
{
|
||||
addGroup("Rendering");
|
||||
addProtectedField("enabled", TypeBool, Offset(mEnabled, ReflectionProbe),
|
||||
&_setEnabled, &defaultProtectedGetFn, "Regenerate Voxel Grid");
|
||||
endGroup("Rendering");
|
||||
|
||||
addGroup("Reflection");
|
||||
addProtectedField("radius", TypeF32, Offset(mRadius, ReflectionProbe), &_setRadius, &defaultProtectedGetFn,
|
||||
"The name of the material used to render the mesh.");
|
||||
|
||||
addProtectedField("EditPosOffset", TypeBool, Offset(mEditPosOffset, ReflectionProbe),
|
||||
&_toggleEditPosOffset, &defaultProtectedGetFn, "Toggle Edit Pos Offset Mode", AbstractClassRep::FieldFlags::FIELD_ComponentInspectors);
|
||||
|
||||
addField("refOffset", TypePoint3F, Offset(mProbeRefOffset, ReflectionProbe), "");
|
||||
addField("refScale", TypePoint3F, Offset(mProbeRefScale, ReflectionProbe), "");
|
||||
|
||||
addProtectedField("ReflectionMode", TypeReflectionModeEnum, Offset(mReflectionModeType, ReflectionProbe), &_setReflectionMode, &defaultProtectedGetFn,
|
||||
"The type of mesh data to use for collision queries.");
|
||||
|
||||
addField("StaticCubemap", TypeCubemapName, Offset(mCubemapName, ReflectionProbe), "Cubemap used instead of reflection texture if fullReflect is off.");
|
||||
|
||||
addProtectedField("Bake", TypeBool, Offset(mBake, ReflectionProbe),
|
||||
&_doBake, &defaultProtectedGetFn, "Regenerate Voxel Grid", AbstractClassRep::FieldFlags::FIELD_ComponentInspectors);
|
||||
endGroup("Reflection");
|
||||
|
||||
Con::addVariable("$Light::renderReflectionProbes", TypeBool, &RenderProbeMgr::smRenderReflectionProbes,
|
||||
"Toggles rendering of light frustums when the light is selected in the editor.\n\n"
|
||||
"@note Only works for shadow mapped lights.\n\n"
|
||||
"@ingroup Lighting");
|
||||
|
||||
Con::addVariable("$Light::renderPreviewProbes", TypeBool, &ReflectionProbe::smRenderPreviewProbes,
|
||||
"Toggles rendering of light frustums when the light is selected in the editor.\n\n"
|
||||
"@note Only works for shadow mapped lights.\n\n"
|
||||
"@ingroup Lighting");
|
||||
|
||||
// SceneObject already handles exposing the transform
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
void ReflectionProbe::inspectPostApply()
|
||||
{
|
||||
Parent::inspectPostApply();
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Flag the network mask to send the updates
|
||||
// to the client object
|
||||
setMaskBits(-1);
|
||||
}
|
||||
|
||||
bool ReflectionProbe::_setEnabled(void *object, const char *index, const char *data)
|
||||
{
|
||||
ReflectionProbe* probe = reinterpret_cast< ReflectionProbe* >(object);
|
||||
|
||||
probe->mEnabled = dAtob(data);
|
||||
probe->setMaskBits(-1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReflectionProbe::_doBake(void *object, const char *index, const char *data)
|
||||
{
|
||||
ReflectionProbe* probe = reinterpret_cast< ReflectionProbe* >(object);
|
||||
|
||||
probe->bake();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ReflectionProbe::_toggleEditPosOffset(void *object, const char *index, const char *data)
|
||||
{
|
||||
ReflectionProbe* probe = reinterpret_cast< ReflectionProbe* >(object);
|
||||
|
||||
probe->mEditPosOffset = !probe->mEditPosOffset;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ReflectionProbe::_setRadius(void *object, const char *index, const char *data)
|
||||
{
|
||||
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
|
||||
|
||||
if (probe->mProbeShapeType != ProbeRenderInst::Sphere)
|
||||
return false;
|
||||
|
||||
probe->mObjScale = Point3F(probe->mRadius, probe->mRadius, probe->mRadius);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReflectionProbe::_setReflectionMode(void *object, const char *index, const char *data)
|
||||
{
|
||||
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
|
||||
|
||||
if (data == "Static Cubemap")
|
||||
{
|
||||
probe->mReflectionModeType = StaticCubemap;
|
||||
}
|
||||
else if (data == "Baked Cubemap")
|
||||
{
|
||||
//Clear our cubemap if we changed it to be baked, just for cleanliness
|
||||
probe->mReflectionModeType = BakedCubemap;
|
||||
probe->mCubemapName = "";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReflectionProbe::onAdd()
|
||||
{
|
||||
if (!Parent::onAdd())
|
||||
return false;
|
||||
|
||||
mEditPosOffset = false;
|
||||
|
||||
mObjBox.minExtents.set(-0.5, -0.5, -0.5);
|
||||
mObjBox.maxExtents.set(0.5, 0.5, 0.5);
|
||||
|
||||
// Skip our transform... it just dirties mask bits.
|
||||
Parent::setTransform(mObjToWorld);
|
||||
|
||||
resetWorldBox();
|
||||
|
||||
// Add this object to the scene
|
||||
addToScene();
|
||||
|
||||
if (isServerObject())
|
||||
{
|
||||
if (!mPersistentId)
|
||||
mPersistentId = getOrCreatePersistentId();
|
||||
|
||||
mProbeUniqueID = String::ToString(mPersistentId->getUUID().getHash());
|
||||
}
|
||||
|
||||
// Refresh this object's material (if any)
|
||||
if (isClientObject())
|
||||
{
|
||||
createGeometry();
|
||||
updateProbeParams();
|
||||
}
|
||||
|
||||
setMaskBits(-1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ReflectionProbe::onRemove()
|
||||
{
|
||||
if (isClientObject())
|
||||
{
|
||||
PROBEMGR->unregisterProbe(mProbeInfoIdx);
|
||||
}
|
||||
// Remove this object from the scene
|
||||
removeFromScene();
|
||||
|
||||
Parent::onRemove();
|
||||
}
|
||||
|
||||
void ReflectionProbe::handleDeleteAction()
|
||||
{
|
||||
//we're deleting it?
|
||||
//Then we need to clear out the processed cubemaps(if we have them)
|
||||
|
||||
String prefilPath = getPrefilterMapPath();
|
||||
if (Platform::isFile(prefilPath))
|
||||
{
|
||||
Platform::fileDelete(prefilPath);
|
||||
}
|
||||
|
||||
String irrPath = getIrradianceMapPath();
|
||||
if (Platform::isFile(irrPath))
|
||||
{
|
||||
Platform::fileDelete(irrPath);
|
||||
}
|
||||
|
||||
Parent::handleDeleteAction();
|
||||
}
|
||||
|
||||
void ReflectionProbe::setTransform(const MatrixF & mat)
|
||||
{
|
||||
// Let SceneObject handle all of the matrix manipulation
|
||||
if (!mEditPosOffset)
|
||||
Parent::setTransform(mat);
|
||||
else
|
||||
mProbeRefOffset = mat.getPosition();
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Dirty our network mask so that the new transform gets
|
||||
// transmitted to the client object
|
||||
setMaskBits(TransformMask);
|
||||
}
|
||||
|
||||
const MatrixF& ReflectionProbe::getTransform() const
|
||||
{
|
||||
if (!mEditPosOffset)
|
||||
return mObjToWorld;
|
||||
else
|
||||
{
|
||||
MatrixF transformMat = MatrixF::Identity;
|
||||
transformMat.setPosition(mProbeRefOffset);
|
||||
|
||||
return transformMat;
|
||||
}
|
||||
}
|
||||
|
||||
void ReflectionProbe::setScale(const VectorF &scale)
|
||||
{
|
||||
if (!mEditPosOffset)
|
||||
Parent::setScale(scale);
|
||||
else
|
||||
mProbeRefScale = scale;
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Dirty our network mask so that the new transform gets
|
||||
// transmitted to the client object
|
||||
setMaskBits(TransformMask);
|
||||
}
|
||||
|
||||
const VectorF& ReflectionProbe::getScale() const
|
||||
{
|
||||
if (!mEditPosOffset)
|
||||
return mObjScale;
|
||||
else
|
||||
return mProbeRefScale;
|
||||
}
|
||||
|
||||
bool ReflectionProbe::writeField(StringTableEntry fieldname, const char *value)
|
||||
{
|
||||
if (fieldname == StringTable->insert("Bake") || fieldname == StringTable->insert("EditPosOffset"))
|
||||
return false;
|
||||
|
||||
return Parent::writeField(fieldname, value);
|
||||
}
|
||||
|
||||
U32 ReflectionProbe::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
|
||||
{
|
||||
// Allow the Parent to get a crack at writing its info
|
||||
U32 retMask = Parent::packUpdate(conn, mask, stream);
|
||||
|
||||
// Write our transform information
|
||||
if (stream->writeFlag(mask & TransformMask))
|
||||
{
|
||||
stream->writeFlag(mEditPosOffset);
|
||||
mathWrite(*stream, mObjToWorld);
|
||||
mathWrite(*stream, mObjScale);
|
||||
mathWrite(*stream, mProbeRefOffset);
|
||||
mathWrite(*stream, mProbeRefScale);
|
||||
}
|
||||
|
||||
if (stream->writeFlag(mask & ShapeTypeMask))
|
||||
{
|
||||
stream->write((U32)mProbeShapeType);
|
||||
}
|
||||
|
||||
if (stream->writeFlag(mask & UpdateMask))
|
||||
{
|
||||
stream->write(mRadius);
|
||||
}
|
||||
|
||||
if (stream->writeFlag(mask & BakeInfoMask))
|
||||
{
|
||||
stream->write(mProbeUniqueID);
|
||||
}
|
||||
|
||||
if (stream->writeFlag(mask & EnabledMask))
|
||||
{
|
||||
stream->writeFlag(mEnabled);
|
||||
}
|
||||
|
||||
if (stream->writeFlag(mask & ModeMask))
|
||||
{
|
||||
stream->write((U32)mReflectionModeType);
|
||||
}
|
||||
|
||||
if (stream->writeFlag(mask & CubemapMask))
|
||||
{
|
||||
stream->write(mCubemapName);
|
||||
}
|
||||
|
||||
return retMask;
|
||||
}
|
||||
|
||||
void ReflectionProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
||||
{
|
||||
// Let the Parent read any info it sent
|
||||
Parent::unpackUpdate(conn, stream);
|
||||
|
||||
if (stream->readFlag()) // TransformMask
|
||||
{
|
||||
mEditPosOffset = stream->readFlag();
|
||||
mathRead(*stream, &mObjToWorld);
|
||||
mathRead(*stream, &mObjScale);
|
||||
|
||||
Parent::setTransform(mObjToWorld);
|
||||
|
||||
resetWorldBox();
|
||||
|
||||
mathRead(*stream, &mProbeRefOffset);
|
||||
mathRead(*stream, &mProbeRefScale);
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (stream->readFlag()) // ShapeTypeMask
|
||||
{
|
||||
U32 shapeType = ProbeRenderInst::Sphere;
|
||||
stream->read(&shapeType);
|
||||
|
||||
mProbeShapeType = (ProbeRenderInst::ProbeShapeType)shapeType;
|
||||
createGeometry();
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (stream->readFlag()) // UpdateMask
|
||||
{
|
||||
stream->read(&mRadius);
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (stream->readFlag()) // BakeInfoMask
|
||||
{
|
||||
stream->read(&mProbeUniqueID);
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (stream->readFlag()) // EnabledMask
|
||||
{
|
||||
mEnabled = stream->readFlag();
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (stream->readFlag()) // ModeMask
|
||||
{
|
||||
U32 reflectModeType = BakedCubemap;
|
||||
stream->read(&reflectModeType);
|
||||
mReflectionModeType = (ReflectionModeType)reflectModeType;
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (stream->readFlag()) // CubemapMask
|
||||
{
|
||||
String newCubemapName;
|
||||
stream->read(&mCubemapName);
|
||||
|
||||
//if (newCubemapName != mCubemapName)
|
||||
{
|
||||
processStaticCubemap();
|
||||
}
|
||||
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
if (mDirty)
|
||||
{
|
||||
updateProbeParams();
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
//-----------------------------------------------------------------------------
|
||||
void ReflectionProbe::updateProbeParams()
|
||||
{
|
||||
if (mProbeInfo == nullptr)
|
||||
{
|
||||
mProbeInfo = new ProbeRenderInst();
|
||||
mProbeInfoIdx = ProbeRenderInst::all.size() - 1;
|
||||
mProbeInfo->mIsEnabled = false;
|
||||
|
||||
PROBEMGR->registerProbe(mProbeInfoIdx);
|
||||
}
|
||||
|
||||
mProbeInfo->mProbeShapeType = mProbeShapeType;
|
||||
|
||||
MatrixF transform = getTransform();
|
||||
mProbeInfo->mPosition = getPosition();
|
||||
|
||||
if (mProbeShapeType == ProbeRenderInst::Sphere)
|
||||
mObjScale.set(mRadius, mRadius, mRadius);
|
||||
|
||||
transform.scale(getScale());
|
||||
mProbeInfo->mTransform = transform.inverse();
|
||||
|
||||
// Skip our transform... it just dirties mask bits.
|
||||
Parent::setTransform(mObjToWorld);
|
||||
|
||||
resetWorldBox();
|
||||
|
||||
mProbeInfo->mBounds = mWorldBox;
|
||||
mProbeInfo->mExtents = getScale();
|
||||
mProbeInfo->mRadius = mRadius;
|
||||
|
||||
mProbeInfo->mIsSkylight = false;
|
||||
|
||||
mProbeInfo->mProbeRefOffset = mProbeRefOffset;
|
||||
mProbeInfo->mProbeRefScale = mProbeRefScale;
|
||||
|
||||
mProbeInfo->mDirty = true;
|
||||
mProbeInfo->mScore = mMaxDrawDistance;
|
||||
}
|
||||
|
||||
void ReflectionProbe::processStaticCubemap()
|
||||
{
|
||||
if (mReflectionModeType != StaticCubemap)
|
||||
return;
|
||||
|
||||
createClientResources();
|
||||
|
||||
Sim::findObject(mCubemapName, mStaticCubemap);
|
||||
|
||||
if (!mStaticCubemap)
|
||||
{
|
||||
Con::errorf("ReflectionProbe::updateMaterial() - unable to find static cubemap file!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mStaticCubemap->mCubemap == nullptr)
|
||||
{
|
||||
mStaticCubemap->createMap();
|
||||
mStaticCubemap->updateFaces();
|
||||
}
|
||||
|
||||
String prefilPath = getPrefilterMapPath();
|
||||
String irrPath = getIrradianceMapPath();
|
||||
|
||||
if (mUseHDRCaptures)
|
||||
{
|
||||
mIrridianceMap->mCubemap->initDynamic(mPrefilterSize, GFXFormatR16G16B16A16F);
|
||||
mPrefilterMap->mCubemap->initDynamic(mPrefilterSize, GFXFormatR16G16B16A16F);
|
||||
}
|
||||
else
|
||||
{
|
||||
mIrridianceMap->mCubemap->initDynamic(mPrefilterSize, GFXFormatR8G8B8A8);
|
||||
mPrefilterMap->mCubemap->initDynamic(mPrefilterSize, GFXFormatR8G8B8A8);
|
||||
}
|
||||
|
||||
//if (!Platform::isFile(irrPath) || !Platform::isFile(prefilPath))
|
||||
{
|
||||
GFXTextureTargetRef renderTarget = GFX->allocRenderToTextureTarget(false);
|
||||
|
||||
IBLUtilities::GenerateIrradianceMap(renderTarget, mStaticCubemap->mCubemap, mIrridianceMap->mCubemap);
|
||||
IBLUtilities::GeneratePrefilterMap(renderTarget, mStaticCubemap->mCubemap, mPrefilterMipLevels, mPrefilterMap->mCubemap);
|
||||
|
||||
IBLUtilities::SaveCubeMap(getIrradianceMapPath(), mIrridianceMap->mCubemap);
|
||||
IBLUtilities::SaveCubeMap(getPrefilterMapPath(), mPrefilterMap->mCubemap);
|
||||
}
|
||||
|
||||
mProbeInfo->mPrefilterCubemap = mPrefilterMap->mCubemap;
|
||||
mProbeInfo->mIrradianceCubemap = mIrridianceMap->mCubemap;
|
||||
|
||||
//Update the probe manager with our new texture!
|
||||
if(!mProbeInfo->mIsSkylight)
|
||||
PROBEMGR->updateProbeTexture(mProbeInfo);
|
||||
}
|
||||
|
||||
void ReflectionProbe::updateCubemaps()
|
||||
{
|
||||
createClientResources();
|
||||
|
||||
if (mReflectionModeType != DynamicCubemap)
|
||||
{
|
||||
mProbeInfo->mCubeReflector.unregisterReflector();
|
||||
|
||||
if ((mReflectionModeType == BakedCubemap) && !mProbeUniqueID.isEmpty())
|
||||
{
|
||||
if (mPrefilterMap != nullptr && mPrefilterMap->mCubemap.isValid())
|
||||
{
|
||||
mProbeInfo->mPrefilterCubemap = mPrefilterMap->mCubemap;
|
||||
}
|
||||
else
|
||||
{
|
||||
mEnabled = false;
|
||||
}
|
||||
if (mIrridianceMap != nullptr && mIrridianceMap->mCubemap.isValid())
|
||||
{
|
||||
mProbeInfo->mIrradianceCubemap = mIrridianceMap->mCubemap;
|
||||
}
|
||||
else
|
||||
{
|
||||
mEnabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mReflectionModeType == DynamicCubemap && !mDynamicCubemap.isNull())
|
||||
{
|
||||
mProbeInfo->mPrefilterCubemap = mDynamicCubemap;
|
||||
|
||||
mProbeInfo->mCubeReflector.registerReflector(this, reflectorDesc); //need to decide how we wanna do the reflectorDesc. static name or a field
|
||||
}
|
||||
else
|
||||
{
|
||||
mEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
//Make us ready to render
|
||||
if (mEnabled)
|
||||
mProbeInfo->mIsEnabled = true;
|
||||
else
|
||||
mProbeInfo->mIsEnabled = false;
|
||||
|
||||
if (!mProbeInfo->mIsSkylight && mProbeInfo->mPrefilterCubemap->isInitialized() && mProbeInfo->mIrradianceCubemap->isInitialized())
|
||||
PROBEMGR->updateProbeTexture(mProbeInfo);
|
||||
}
|
||||
|
||||
bool ReflectionProbe::createClientResources()
|
||||
{
|
||||
//irridiance resources
|
||||
if (!mIrridianceMap)
|
||||
{
|
||||
mIrridianceMap = new CubemapData();
|
||||
mIrridianceMap->registerObject();
|
||||
|
||||
mIrridianceMap->createMap();
|
||||
}
|
||||
|
||||
String irrPath = getIrradianceMapPath();
|
||||
if (Platform::isFile(irrPath))
|
||||
{
|
||||
mIrridianceMap->setCubemapFile(FileName(irrPath));
|
||||
mIrridianceMap->updateFaces();
|
||||
}
|
||||
|
||||
if (mIrridianceMap->mCubemap.isNull())
|
||||
Con::errorf("ReflectionProbe::createClientResources() - Unable to load baked irradiance map at %s", getIrradianceMapPath().c_str());
|
||||
|
||||
//
|
||||
if (!mPrefilterMap)
|
||||
{
|
||||
mPrefilterMap = new CubemapData();
|
||||
mPrefilterMap->registerObject();
|
||||
|
||||
mPrefilterMap->createMap();
|
||||
}
|
||||
|
||||
String prefilPath = getPrefilterMapPath();
|
||||
if (Platform::isFile(prefilPath))
|
||||
{
|
||||
mPrefilterMap->setCubemapFile(FileName(prefilPath));
|
||||
mPrefilterMap->updateFaces();
|
||||
}
|
||||
|
||||
if (mPrefilterMap->mCubemap.isNull())
|
||||
Con::errorf("ReflectionProbe::createClientResources() - Unable to load baked prefilter map at %s", getPrefilterMapPath().c_str());
|
||||
|
||||
mResourcesCreated = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
String ReflectionProbe::getPrefilterMapPath()
|
||||
{
|
||||
if (mProbeUniqueID.isEmpty())
|
||||
{
|
||||
Con::errorf("ReflectionProbe::getPrefilterMapPath() - We don't have a set output path or persistant id, so no valid path can be provided!");
|
||||
return "";
|
||||
}
|
||||
|
||||
String path = Con::getVariable("$pref::ReflectionProbes::CurrentLevelPath", "levels/");
|
||||
|
||||
char fileName[256];
|
||||
dSprintf(fileName, 256, "%s%s_Prefilter.dds", path.c_str(), mProbeUniqueID.c_str());
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
String ReflectionProbe::getIrradianceMapPath()
|
||||
{
|
||||
if (mProbeUniqueID.isEmpty())
|
||||
{
|
||||
Con::errorf("ReflectionProbe::getIrradianceMapPath() - We don't have a set output path or persistant id, so no valid path can be provided!");
|
||||
return "";
|
||||
}
|
||||
|
||||
String path = Con::getVariable("$pref::ReflectionProbes::CurrentLevelPath", "levels/");
|
||||
|
||||
char fileName[256];
|
||||
dSprintf(fileName, 256, "%s%s_Irradiance.dds", path.c_str(), mProbeUniqueID.c_str());
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
void ReflectionProbe::bake()
|
||||
{
|
||||
if (mReflectionModeType == DynamicCubemap)
|
||||
return;
|
||||
|
||||
PROBEMGR->bakeProbe(this);
|
||||
|
||||
setMaskBits(CubemapMask);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
//Rendering of editing/debug stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
void ReflectionProbe::createGeometry()
|
||||
{
|
||||
// Clean up our previous shape
|
||||
if (mEditorShapeInst)
|
||||
SAFE_DELETE(mEditorShapeInst);
|
||||
|
||||
mEditorShape = NULL;
|
||||
|
||||
String shapeFile = "tools/resources/ReflectProbeSphere.dae";
|
||||
|
||||
// Attempt to get the resource from the ResourceManager
|
||||
mEditorShape = ResourceManager::get().load(shapeFile);
|
||||
if (mEditorShape)
|
||||
{
|
||||
mEditorShapeInst = new TSShapeInstance(mEditorShape, isClientObject());
|
||||
}
|
||||
}
|
||||
|
||||
void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
||||
{
|
||||
if (!mEnabled || !RenderProbeMgr::smRenderReflectionProbes)
|
||||
return;
|
||||
|
||||
Point3F distVec = getRenderPosition() - state->getCameraPosition();
|
||||
F32 dist = distVec.len();
|
||||
|
||||
//Culling distance. Can be adjusted for performance options considerations via the scalar
|
||||
if (dist > mMaxDrawDistance * Con::getFloatVariable("$pref::GI::ProbeDrawDistScale", 1.0))
|
||||
{
|
||||
mProbeInfo->mScore = mMaxDrawDistance;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mReflectionModeType == DynamicCubemap && mRefreshRateMS < (Platform::getRealMilliseconds() - mDynamicLastBakeMS))
|
||||
{
|
||||
bake();
|
||||
mDynamicLastBakeMS = Platform::getRealMilliseconds();
|
||||
}
|
||||
|
||||
//Submit our probe to actually do the probe action
|
||||
// Get a handy pointer to our RenderPassmanager
|
||||
//RenderPassManager *renderPass = state->getRenderPass();
|
||||
|
||||
//Update our score based on our radius, distance
|
||||
mProbeInfo->mScore = mProbeInfo->mRadius/mMax(dist,1.0f);
|
||||
|
||||
Point3F vect = distVec;
|
||||
vect.normalizeSafe();
|
||||
|
||||
mProbeInfo->mScore *= mMax(mAbs(mDot(vect, state->getCameraTransform().getForwardVector())),0.001f);
|
||||
|
||||
//Register
|
||||
//PROBEMGR->registerProbe(mProbeInfoIdx);
|
||||
|
||||
if (ReflectionProbe::smRenderPreviewProbes && gEditingMission && mEditorShapeInst && mPrefilterMap != nullptr)
|
||||
{
|
||||
GFXTransformSaver saver;
|
||||
|
||||
// Calculate the distance of this object from the camera
|
||||
Point3F cameraOffset;
|
||||
getRenderTransform().getColumn(3, &cameraOffset);
|
||||
cameraOffset -= state->getDiffuseCameraPosition();
|
||||
dist = cameraOffset.len();
|
||||
if (dist < 0.01f)
|
||||
dist = 0.01f;
|
||||
|
||||
// Set up the LOD for the shape
|
||||
F32 invScale = (1.0f / getMax(getMax(mObjScale.x, mObjScale.y), mObjScale.z));
|
||||
|
||||
mEditorShapeInst->setDetailFromDistance(state, dist * invScale);
|
||||
|
||||
// Make sure we have a valid level of detail
|
||||
if (mEditorShapeInst->getCurrentDetail() < 0)
|
||||
return;
|
||||
|
||||
BaseMatInstance* probePrevMat = mEditorShapeInst->getMaterialList()->getMaterialInst(0);
|
||||
|
||||
setPreviewMatParameters(state, probePrevMat);
|
||||
|
||||
// GFXTransformSaver is a handy helper class that restores
|
||||
// the current GFX matrices to their original values when
|
||||
// it goes out of scope at the end of the function
|
||||
|
||||
// Set up our TS render state
|
||||
TSRenderState rdata;
|
||||
rdata.setSceneState(state);
|
||||
rdata.setFadeOverride(1.0f);
|
||||
|
||||
if(mReflectionModeType != DynamicCubemap)
|
||||
rdata.setCubemap(mPrefilterMap->mCubemap);
|
||||
else
|
||||
rdata.setCubemap(mDynamicCubemap);
|
||||
|
||||
// We might have some forward lit materials
|
||||
// so pass down a query to gather lights.
|
||||
LightQuery query;
|
||||
query.init(getWorldSphere());
|
||||
rdata.setLightQuery(&query);
|
||||
|
||||
// Set the world matrix to the objects render transform
|
||||
MatrixF mat = getRenderTransform();
|
||||
GFX->setWorldMatrix(mat);
|
||||
|
||||
// Animate the the shape
|
||||
mEditorShapeInst->animate();
|
||||
|
||||
// Allow the shape to submit the RenderInst(s) for itself
|
||||
mEditorShapeInst->render(rdata);
|
||||
|
||||
saver.restore();
|
||||
}
|
||||
|
||||
// If the light is selected or light visualization
|
||||
// is enabled then register the callback.
|
||||
const bool isSelectedInEditor = (gEditingMission && isSelected());
|
||||
if (isSelectedInEditor)
|
||||
{
|
||||
ObjectRenderInst *ri = state->getRenderPass()->allocInst<ObjectRenderInst>();
|
||||
ri->renderDelegate.bind(this, &ReflectionProbe::_onRenderViz);
|
||||
ri->type = RenderPassManager::RIT_Editor;
|
||||
state->getRenderPass()->addInst(ri);
|
||||
}
|
||||
}
|
||||
|
||||
void ReflectionProbe::_onRenderViz(ObjectRenderInst *ri,
|
||||
SceneRenderState *state,
|
||||
BaseMatInstance *overrideMat)
|
||||
{
|
||||
if (!RenderProbeMgr::smRenderReflectionProbes)
|
||||
return;
|
||||
|
||||
GFXDrawUtil *draw = GFX->getDrawUtil();
|
||||
|
||||
GFXStateBlockDesc desc;
|
||||
desc.setZReadWrite(true, false);
|
||||
desc.setCullMode(GFXCullNone);
|
||||
desc.setBlend(true);
|
||||
desc.fillMode = GFXFillWireframe;
|
||||
// Base the sphere color on the light color.
|
||||
ColorI color = ColorI(255, 0, 255, 63);
|
||||
|
||||
const MatrixF worldToObjectXfm = mObjToWorld;
|
||||
if (mProbeShapeType == ProbeRenderInst::Sphere)
|
||||
{
|
||||
draw->drawSphere(desc, mRadius, getPosition(), color);
|
||||
}
|
||||
else
|
||||
{
|
||||
Point3F tscl = worldToObjectXfm.getScale();
|
||||
|
||||
Box3F projCube(-mObjScale/2, mObjScale / 2);
|
||||
projCube.setCenter(getPosition());
|
||||
draw->drawCube(desc, projCube, color, &worldToObjectXfm);
|
||||
}
|
||||
|
||||
Point3F renderPos = getRenderTransform().getPosition();
|
||||
|
||||
Box3F refCube = Box3F(-mProbeRefScale / 2, mProbeRefScale / 2);
|
||||
refCube.setCenter(renderPos + mProbeRefOffset);
|
||||
color = ColorI(0, 255, 255, 63);
|
||||
draw->drawCube(desc, refCube, color, &worldToObjectXfm);
|
||||
}
|
||||
|
||||
void ReflectionProbe::setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat)
|
||||
{
|
||||
if (!mat->getFeatures().hasFeature(MFT_isDeferred))
|
||||
return;
|
||||
|
||||
//Set up the params
|
||||
MaterialParameters *matParams = mat->getMaterialParameters();
|
||||
|
||||
//Get the deferred render target
|
||||
NamedTexTarget* deferredTexTarget = NamedTexTarget::find("deferred");
|
||||
|
||||
GFXTextureObject *deferredTexObject = deferredTexTarget->getTexture();
|
||||
if (!deferredTexObject)
|
||||
return;
|
||||
|
||||
GFX->setTexture(0, deferredTexObject);
|
||||
|
||||
//Set the cubemap
|
||||
GFX->setCubeTexture(1, mPrefilterMap->mCubemap);
|
||||
|
||||
//Set the invViewMat
|
||||
MatrixSet &matrixSet = renderState->getRenderPass()->getMatrixSet();
|
||||
const MatrixF &worldToCameraXfm = matrixSet.getWorldToCamera();
|
||||
|
||||
MaterialParameterHandle *invViewMat = mat->getMaterialParameterHandle("$invViewMat");
|
||||
|
||||
matParams->setSafe(invViewMat, worldToCameraXfm);
|
||||
}
|
||||
|
||||
DefineEngineMethod(ReflectionProbe, postApply, void, (), ,
|
||||
"A utility method for forcing a network update.\n")
|
||||
{
|
||||
object->inspectPostApply();
|
||||
}
|
||||
|
||||
DefineEngineMethod(ReflectionProbe, Bake, void, (), ,
|
||||
"@brief returns true if control object is inside the fog\n\n.")
|
||||
{
|
||||
ReflectionProbe *clientProbe = (ReflectionProbe*)object->getClientObject();
|
||||
|
||||
if (clientProbe)
|
||||
{
|
||||
clientProbe->bake();
|
||||
}
|
||||
}
|
||||
256
Engine/source/T3D/lighting/reflectionProbe.h
Normal file
256
Engine/source/T3D/lighting/reflectionProbe.h
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef REFLECTIONPROBE_H
|
||||
#define REFLECTIONPROBE_H
|
||||
|
||||
#ifndef _SCENEOBJECT_H_
|
||||
#include "scene/sceneObject.h"
|
||||
#endif
|
||||
#ifndef _GFXVERTEXBUFFER_H_
|
||||
#include "gfx/gfxVertexBuffer.h"
|
||||
#endif
|
||||
#ifndef _GFXPRIMITIVEBUFFER_H_
|
||||
#include "gfx/gfxPrimitiveBuffer.h"
|
||||
#endif
|
||||
#ifndef _TSSHAPEINSTANCE_H_
|
||||
#include "ts/tsShapeInstance.h"
|
||||
#endif
|
||||
#include "lighting/lightInfo.h"
|
||||
|
||||
#ifndef _RENDERPASSMANAGER_H_
|
||||
#include "renderInstance/renderPassManager.h"
|
||||
#endif
|
||||
|
||||
#ifndef RENDER_PROBE_MGR_H
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
#endif
|
||||
|
||||
class BaseMatInstance;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This class implements a basic SceneObject that can exist in the world at a
|
||||
// 3D position and render itself. There are several valid ways to render an
|
||||
// object in Torque. This class implements the preferred rendering method which
|
||||
// is to submit a MeshRenderInst along with a Material, vertex buffer,
|
||||
// primitive buffer, and transform and allow the RenderMeshMgr handle the
|
||||
// actual setup and rendering for you.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class ReflectionProbe : public SceneObject
|
||||
{
|
||||
typedef SceneObject Parent;
|
||||
friend class RenderProbeMgr;
|
||||
|
||||
public:
|
||||
|
||||
enum ReflectionModeType
|
||||
{
|
||||
NoReflection = 0,
|
||||
StaticCubemap = 1,
|
||||
BakedCubemap = 2,
|
||||
DynamicCubemap = 5,
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
// Networking masks
|
||||
// We need to implement a mask specifically to handle
|
||||
// updating our transform from the server object to its
|
||||
// client-side "ghost". We also need to implement a
|
||||
// maks for handling editor updates to our properties
|
||||
// (like material).
|
||||
enum MaskBits
|
||||
{
|
||||
TransformMask = Parent::NextFreeMask << 0,
|
||||
UpdateMask = Parent::NextFreeMask << 1,
|
||||
EnabledMask = Parent::NextFreeMask << 2,
|
||||
CubemapMask = Parent::NextFreeMask << 3,
|
||||
ModeMask = Parent::NextFreeMask << 4,
|
||||
RadiusMask = Parent::NextFreeMask << 5,
|
||||
ShapeTypeMask = Parent::NextFreeMask << 6,
|
||||
BakeInfoMask = Parent::NextFreeMask << 7,
|
||||
NextFreeMask = Parent::NextFreeMask << 8
|
||||
};
|
||||
|
||||
bool mBake;
|
||||
bool mEnabled;
|
||||
bool mDirty;
|
||||
|
||||
Resource<TSShape> mEditorShape;
|
||||
TSShapeInstance* mEditorShapeInst;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Rendering variables
|
||||
//--------------------------------------------------------------------------
|
||||
ProbeRenderInst::ProbeShapeType mProbeShapeType;
|
||||
|
||||
ProbeRenderInst* mProbeInfo;
|
||||
U32 mProbeInfoIdx;
|
||||
|
||||
//Reflection Contribution stuff
|
||||
ReflectionModeType mReflectionModeType;
|
||||
|
||||
F32 mRadius;
|
||||
Point3F mProbeRefOffset;
|
||||
Point3F mProbeRefScale;
|
||||
bool mEditPosOffset;
|
||||
|
||||
String mCubemapName;
|
||||
CubemapData *mStaticCubemap;
|
||||
GFXCubemapHandle mDynamicCubemap;
|
||||
|
||||
String cubeDescName;
|
||||
U32 cubeDescId;
|
||||
ReflectorDesc *reflectorDesc;
|
||||
|
||||
///Prevents us from saving out the cubemaps(for now) but allows us the full HDR range on the in-memory cubemap captures
|
||||
bool mUseHDRCaptures;
|
||||
|
||||
//irridiance resources
|
||||
CubemapData *mIrridianceMap;
|
||||
|
||||
//prefilter resources
|
||||
CubemapData *mPrefilterMap;
|
||||
U32 mPrefilterMipLevels;
|
||||
U32 mPrefilterSize;
|
||||
|
||||
String mProbeUniqueID;
|
||||
|
||||
// Define our vertex format here so we don't have to
|
||||
// change it in multiple spots later
|
||||
typedef GFXVertexPNTTB VertexType;
|
||||
|
||||
// The GFX vertex and primitive buffers
|
||||
GFXVertexBufferHandle< VertexType > mVertexBuffer;
|
||||
GFXPrimitiveBufferHandle mPrimitiveBuffer;
|
||||
|
||||
U32 mSphereVertCount;
|
||||
U32 mSpherePrimitiveCount;
|
||||
|
||||
//Debug rendering
|
||||
static bool smRenderPreviewProbes;
|
||||
|
||||
U32 mDynamicLastBakeMS;
|
||||
U32 mRefreshRateMS;
|
||||
|
||||
GBitmap* mCubeFaceBitmaps[6];
|
||||
U32 mCubemapResolution;
|
||||
|
||||
F32 mMaxDrawDistance;
|
||||
|
||||
bool mResourcesCreated;
|
||||
U32 mCaptureMask;
|
||||
|
||||
public:
|
||||
ReflectionProbe();
|
||||
virtual ~ReflectionProbe();
|
||||
|
||||
// Declare this object as a ConsoleObject so that we can
|
||||
// instantiate it into the world and network it
|
||||
DECLARE_CONOBJECT(ReflectionProbe);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
// Since there is always a server and a client object in Torque and we
|
||||
// actually edit the server object we need to implement some basic
|
||||
// networking functions
|
||||
//--------------------------------------------------------------------------
|
||||
// Set up any fields that we want to be editable (like position)
|
||||
static void initPersistFields();
|
||||
|
||||
// Allows the object to update its editable settings
|
||||
// from the server object to the client
|
||||
virtual void inspectPostApply();
|
||||
|
||||
static bool _setEnabled(void *object, const char *index, const char *data);
|
||||
static bool _doBake(void *object, const char *index, const char *data);
|
||||
static bool _toggleEditPosOffset(void *object, const char *index, const char *data);
|
||||
static bool _setRadius(void *object, const char *index, const char *data);
|
||||
static bool _setReflectionMode(void *object, const char *index, const char *data);
|
||||
|
||||
// Handle when we are added to the scene and removed from the scene
|
||||
bool onAdd();
|
||||
void onRemove();
|
||||
|
||||
virtual void handleDeleteAction();
|
||||
|
||||
// Override this so that we can dirty the network flag when it is called
|
||||
virtual void setTransform(const MatrixF &mat);
|
||||
virtual const MatrixF& getTransform() const;
|
||||
virtual void setScale(const VectorF &scale);
|
||||
virtual const VectorF& getScale() const;
|
||||
|
||||
virtual bool writeField(StringTableEntry fieldname, const char *value);
|
||||
|
||||
// This function handles sending the relevant data from the server
|
||||
// object to the client object
|
||||
U32 packUpdate(NetConnection *conn, U32 mask, BitStream *stream);
|
||||
// This function handles receiving relevant data from the server
|
||||
// object and applying it to the client object
|
||||
void unpackUpdate(NetConnection *conn, BitStream *stream);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
// Torque utilizes a "batch" rendering system. This means that it builds a
|
||||
// list of objects that need to render (via RenderInst's) and then renders
|
||||
// them all in one batch. This allows it to optimized on things like
|
||||
// minimizing texture, state, and shader switching by grouping objects that
|
||||
// use the same Materials.
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
// Create the geometry for rendering
|
||||
void createGeometry();
|
||||
|
||||
// Get the Material instance
|
||||
void updateCubemaps();
|
||||
|
||||
virtual void updateProbeParams();
|
||||
|
||||
bool createClientResources();
|
||||
|
||||
void processStaticCubemap();
|
||||
|
||||
// This is the function that allows this object to submit itself for rendering
|
||||
void prepRenderImage(SceneRenderState *state);
|
||||
|
||||
void _onRenderViz(ObjectRenderInst *ri,
|
||||
SceneRenderState *state,
|
||||
BaseMatInstance *overrideMat);
|
||||
|
||||
void setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat);
|
||||
|
||||
//Baking
|
||||
String getPrefilterMapPath();
|
||||
String getIrradianceMapPath();
|
||||
void bake();
|
||||
|
||||
const U32 getProbeInfoIndex() { return mProbeInfoIdx; }
|
||||
};
|
||||
|
||||
typedef ProbeRenderInst::ProbeShapeType ReflectProbeType;
|
||||
DefineEnumType(ReflectProbeType);
|
||||
|
||||
typedef ReflectionProbe::ReflectionModeType ReflectionModeEnum;
|
||||
DefineEnumType(ReflectionModeEnum);
|
||||
|
||||
#endif // _ReflectionProbe_H_
|
||||
276
Engine/source/T3D/lighting/skylight.cpp
Normal file
276
Engine/source/T3D/lighting/skylight.cpp
Normal file
|
|
@ -0,0 +1,276 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "T3D/lighting/Skylight.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "scene/sceneRenderState.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "materials/baseMatInstance.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "gfx/gfxDebugEvent.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "core/fileObject.h"
|
||||
#include "core/resourceManager.h"
|
||||
#include "console/simPersistId.h"
|
||||
#include "T3D/gameFunctions.h"
|
||||
#include "postFx/postEffect.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
|
||||
#include "math/util/sphereMesh.h"
|
||||
#include "materials/materialManager.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
|
||||
#include "materials/materialFeatureTypes.h"
|
||||
|
||||
#include "materials/shaderData.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
|
||||
#include "gfx/bitmap/imageUtils.h"
|
||||
|
||||
#include "T3D/lighting/IBLUtilities.h"
|
||||
|
||||
extern bool gEditingMission;
|
||||
extern ColorI gCanvasClearColor;
|
||||
bool Skylight::smRenderSkylights = true;
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(Skylight);
|
||||
|
||||
ConsoleDocClass(Skylight,
|
||||
"@brief An example scene object which renders a mesh.\n\n"
|
||||
"This class implements a basic SceneObject that can exist in the world at a "
|
||||
"3D position and render itself. There are several valid ways to render an "
|
||||
"object in Torque. This class implements the preferred rendering method which "
|
||||
"is to submit a MeshRenderInst along with a Material, vertex buffer, "
|
||||
"primitive buffer, and transform and allow the RenderMeshMgr handle the "
|
||||
"actual setup and rendering for you.\n\n"
|
||||
"See the C++ code for implementation details.\n\n"
|
||||
"@ingroup Examples\n");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object setup and teardown
|
||||
//-----------------------------------------------------------------------------
|
||||
Skylight::Skylight() : ReflectionProbe()
|
||||
{
|
||||
mCaptureMask = SKYLIGHT_CAPTURE_TYPEMASK;
|
||||
}
|
||||
|
||||
Skylight::~Skylight()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
//-----------------------------------------------------------------------------
|
||||
void Skylight::initPersistFields()
|
||||
{
|
||||
// SceneObject already handles exposing the transform
|
||||
Parent::initPersistFields();
|
||||
|
||||
removeField("radius");
|
||||
removeField("scale");
|
||||
removeField("EditPosOffset");
|
||||
removeField("refOffset");
|
||||
removeField("refScale");
|
||||
}
|
||||
|
||||
void Skylight::inspectPostApply()
|
||||
{
|
||||
Parent::inspectPostApply();
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Flag the network mask to send the updates
|
||||
// to the client object
|
||||
setMaskBits(-1);
|
||||
}
|
||||
|
||||
bool Skylight::onAdd()
|
||||
{
|
||||
if (!Parent::onAdd())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Skylight::onRemove()
|
||||
{
|
||||
Parent::onRemove();
|
||||
}
|
||||
|
||||
void Skylight::setTransform(const MatrixF & mat)
|
||||
{
|
||||
// Let SceneObject handle all of the matrix manipulation
|
||||
Parent::setTransform(mat);
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Dirty our network mask so that the new transform gets
|
||||
// transmitted to the client object
|
||||
setMaskBits(TransformMask);
|
||||
}
|
||||
|
||||
U32 Skylight::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
|
||||
{
|
||||
// Allow the Parent to get a crack at writing its info
|
||||
U32 retMask = Parent::packUpdate(conn, mask, stream);
|
||||
|
||||
return retMask;
|
||||
}
|
||||
|
||||
void Skylight::unpackUpdate(NetConnection *conn, BitStream *stream)
|
||||
{
|
||||
// Let the Parent read any info it sent
|
||||
Parent::unpackUpdate(conn, stream);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void Skylight::updateProbeParams()
|
||||
{
|
||||
Parent::updateProbeParams();
|
||||
|
||||
mProbeInfo->mProbeShapeType = ProbeRenderInst::Skylight;
|
||||
|
||||
mProbeInfo->setPosition(getPosition());
|
||||
|
||||
// Skip our transform... it just dirties mask bits.
|
||||
Parent::setTransform(mObjToWorld);
|
||||
|
||||
resetWorldBox();
|
||||
|
||||
F32 visDist = gClientSceneGraph->getVisibleDistance();
|
||||
Box3F skylightBounds = Box3F(visDist * 2);
|
||||
|
||||
skylightBounds.setCenter(Point3F::Zero);
|
||||
|
||||
mProbeInfo->setPosition(Point3F::Zero);
|
||||
|
||||
mProbeInfo->mBounds = skylightBounds;
|
||||
|
||||
setGlobalBounds();
|
||||
|
||||
mProbeInfo->mIsSkylight = true;
|
||||
mProbeInfo->mScore = -1.0f; //sky comes first
|
||||
|
||||
PROBEMGR->updateProbes();
|
||||
|
||||
updateCubemaps();
|
||||
}
|
||||
|
||||
void Skylight::prepRenderImage(SceneRenderState *state)
|
||||
{
|
||||
if (!mEnabled || !Skylight::smRenderSkylights)
|
||||
return;
|
||||
|
||||
//special hook-in for skylights
|
||||
Point3F camPos = state->getCameraPosition();
|
||||
mProbeInfo->mBounds.setCenter(camPos);
|
||||
|
||||
mProbeInfo->setPosition(camPos);
|
||||
|
||||
//Submit our probe to actually do the probe action
|
||||
// Get a handy pointer to our RenderPassmanager
|
||||
//RenderPassManager *renderPass = state->getRenderPass();
|
||||
|
||||
//PROBEMGR->registerSkylight(mProbeInfo, this);
|
||||
|
||||
if (Skylight::smRenderPreviewProbes && gEditingMission && mEditorShapeInst && mPrefilterMap != nullptr)
|
||||
{
|
||||
GFXTransformSaver saver;
|
||||
|
||||
// Calculate the distance of this object from the camera
|
||||
Point3F cameraOffset;
|
||||
getRenderTransform().getColumn(3, &cameraOffset);
|
||||
cameraOffset -= state->getDiffuseCameraPosition();
|
||||
F32 dist = cameraOffset.len();
|
||||
if (dist < 0.01f)
|
||||
dist = 0.01f;
|
||||
|
||||
// Set up the LOD for the shape
|
||||
F32 invScale = (1.0f / getMax(getMax(mObjScale.x, mObjScale.y), mObjScale.z));
|
||||
|
||||
mEditorShapeInst->setDetailFromDistance(state, dist * invScale);
|
||||
|
||||
// Make sure we have a valid level of detail
|
||||
if (mEditorShapeInst->getCurrentDetail() < 0)
|
||||
return;
|
||||
|
||||
BaseMatInstance* probePrevMat = mEditorShapeInst->getMaterialList()->getMaterialInst(0);
|
||||
|
||||
setPreviewMatParameters(state, probePrevMat);
|
||||
|
||||
// GFXTransformSaver is a handy helper class that restores
|
||||
// the current GFX matrices to their original values when
|
||||
// it goes out of scope at the end of the function
|
||||
|
||||
// Set up our TS render state
|
||||
TSRenderState rdata;
|
||||
rdata.setSceneState(state);
|
||||
rdata.setFadeOverride(1.0f);
|
||||
|
||||
// We might have some forward lit materials
|
||||
// so pass down a query to gather lights.
|
||||
LightQuery query;
|
||||
query.init(getWorldSphere());
|
||||
rdata.setLightQuery(&query);
|
||||
|
||||
// Set the world matrix to the objects render transform
|
||||
MatrixF mat = getRenderTransform();
|
||||
mat.scale(Point3F(1, 1, 1));
|
||||
GFX->setWorldMatrix(mat);
|
||||
|
||||
// Animate the the shape
|
||||
mEditorShapeInst->animate();
|
||||
|
||||
// Allow the shape to submit the RenderInst(s) for itself
|
||||
mEditorShapeInst->render(rdata);
|
||||
|
||||
saver.restore();
|
||||
}
|
||||
|
||||
// If the light is selected or light visualization
|
||||
// is enabled then register the callback.
|
||||
const bool isSelectedInEditor = (gEditingMission && isSelected());
|
||||
if (isSelectedInEditor)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void Skylight::setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat)
|
||||
{
|
||||
Parent::setPreviewMatParameters(renderState, mat);
|
||||
}
|
||||
|
||||
DefineEngineMethod(Skylight, postApply, void, (), ,
|
||||
"A utility method for forcing a network update.\n")
|
||||
{
|
||||
object->inspectPostApply();
|
||||
}
|
||||
115
Engine/source/T3D/lighting/skylight.h
Normal file
115
Engine/source/T3D/lighting/skylight.h
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef SKYLIGHT_H
|
||||
#define SKYLIGHT_H
|
||||
|
||||
#ifndef REFLECTIONPROBE_H
|
||||
#include "T3D/lighting/reflectionProbe.h"
|
||||
#endif
|
||||
#ifndef _GFXVERTEXBUFFER_H_
|
||||
#include "gfx/gfxVertexBuffer.h"
|
||||
#endif
|
||||
#ifndef _GFXPRIMITIVEBUFFER_H_
|
||||
#include "gfx/gfxPrimitiveBuffer.h"
|
||||
#endif
|
||||
#ifndef _TSSHAPEINSTANCE_H_
|
||||
#include "ts/tsShapeInstance.h"
|
||||
#endif
|
||||
#include "lighting/lightInfo.h"
|
||||
|
||||
#ifndef _RENDERPASSMANAGER_H_
|
||||
#include "renderInstance/renderPassManager.h"
|
||||
#endif
|
||||
|
||||
class BaseMatInstance;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This class implements a basic SceneObject that can exist in the world at a
|
||||
// 3D position and render itself. There are several valid ways to render an
|
||||
// object in Torque. This class implements the preferred rendering method which
|
||||
// is to submit a MeshRenderInst along with a Material, vertex buffer,
|
||||
// primitive buffer, and transform and allow the RenderMeshMgr handle the
|
||||
// actual setup and rendering for you.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class Skylight : public ReflectionProbe
|
||||
{
|
||||
typedef ReflectionProbe Parent;
|
||||
|
||||
private:
|
||||
|
||||
//Debug rendering
|
||||
static bool smRenderSkylights;
|
||||
|
||||
public:
|
||||
Skylight();
|
||||
virtual ~Skylight();
|
||||
|
||||
// Declare this object as a ConsoleObject so that we can
|
||||
// instantiate it into the world and network it
|
||||
DECLARE_CONOBJECT(Skylight);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
// Since there is always a server and a client object in Torque and we
|
||||
// actually edit the server object we need to implement some basic
|
||||
// networking functions
|
||||
//--------------------------------------------------------------------------
|
||||
// Set up any fields that we want to be editable (like position)
|
||||
static void initPersistFields();
|
||||
|
||||
// Allows the object to update its editable settings
|
||||
// from the server object to the client
|
||||
virtual void inspectPostApply();
|
||||
|
||||
// Handle when we are added to the scene and removed from the scene
|
||||
bool onAdd();
|
||||
void onRemove();
|
||||
|
||||
// Override this so that we can dirty the network flag when it is called
|
||||
void setTransform(const MatrixF &mat);
|
||||
|
||||
// This function handles sending the relevant data from the server
|
||||
// object to the client object
|
||||
U32 packUpdate(NetConnection *conn, U32 mask, BitStream *stream);
|
||||
// This function handles receiving relevant data from the server
|
||||
// object and applying it to the client object
|
||||
void unpackUpdate(NetConnection *conn, BitStream *stream);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
// Torque utilizes a "batch" rendering system. This means that it builds a
|
||||
// list of objects that need to render (via RenderInst's) and then renders
|
||||
// them all in one batch. This allows it to optimized on things like
|
||||
// minimizing texture, state, and shader switching by grouping objects that
|
||||
// use the same Materials.
|
||||
//--------------------------------------------------------------------------
|
||||
virtual void updateProbeParams();
|
||||
|
||||
// This is the function that allows this object to submit itself for rendering
|
||||
void prepRenderImage(SceneRenderState *state);
|
||||
|
||||
void setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat);
|
||||
};
|
||||
|
||||
#endif // _Skylight_H_
|
||||
237
Engine/source/T3D/lighting/sphereEnvironmentProbe.cpp
Normal file
237
Engine/source/T3D/lighting/sphereEnvironmentProbe.cpp
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "T3D/lighting/sphereEnvironmentProbe.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "scene/sceneRenderState.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "materials/baseMatInstance.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "gfx/gfxDebugEvent.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "core/fileObject.h"
|
||||
#include "core/resourceManager.h"
|
||||
#include "console/simPersistId.h"
|
||||
#include "T3D/gameFunctions.h"
|
||||
#include "postFx/postEffect.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
|
||||
#include "math/util/sphereMesh.h"
|
||||
#include "materials/materialManager.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
|
||||
#include "materials/materialFeatureTypes.h"
|
||||
|
||||
#include "materials/shaderData.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
|
||||
#include "gfx/bitmap/imageUtils.h"
|
||||
|
||||
#include "T3D/lighting/IBLUtilities.h"
|
||||
|
||||
extern bool gEditingMission;
|
||||
extern ColorI gCanvasClearColor;
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(SphereEnvironmentProbe);
|
||||
|
||||
ConsoleDocClass(SphereEnvironmentProbe,
|
||||
"@brief An example scene object which renders a mesh.\n\n"
|
||||
"This class implements a basic SceneObject that can exist in the world at a "
|
||||
"3D position and render itself. There are several valid ways to render an "
|
||||
"object in Torque. This class implements the preferred rendering method which "
|
||||
"is to submit a MeshRenderInst along with a Material, vertex buffer, "
|
||||
"primitive buffer, and transform and allow the RenderMeshMgr handle the "
|
||||
"actual setup and rendering for you.\n\n"
|
||||
"See the C++ code for implementation details.\n\n"
|
||||
"@ingroup Examples\n");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object setup and teardown
|
||||
//-----------------------------------------------------------------------------
|
||||
SphereEnvironmentProbe::SphereEnvironmentProbe() : ReflectionProbe()
|
||||
{
|
||||
mCaptureMask = REFLECTION_PROBE_CAPTURE_TYPEMASK;
|
||||
mProbeShapeType = ProbeRenderInst::Sphere;
|
||||
}
|
||||
|
||||
SphereEnvironmentProbe::~SphereEnvironmentProbe()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
//-----------------------------------------------------------------------------
|
||||
void SphereEnvironmentProbe::initPersistFields()
|
||||
{
|
||||
// SceneObject already handles exposing the transform
|
||||
Parent::initPersistFields();
|
||||
|
||||
removeField("scale");
|
||||
}
|
||||
|
||||
void SphereEnvironmentProbe::inspectPostApply()
|
||||
{
|
||||
Parent::inspectPostApply();
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Flag the network mask to send the updates
|
||||
// to the client object
|
||||
setMaskBits(-1);
|
||||
}
|
||||
|
||||
bool SphereEnvironmentProbe::onAdd()
|
||||
{
|
||||
if (!Parent::onAdd())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SphereEnvironmentProbe::onRemove()
|
||||
{
|
||||
Parent::onRemove();
|
||||
}
|
||||
|
||||
void SphereEnvironmentProbe::setTransform(const MatrixF & mat)
|
||||
{
|
||||
// Let SceneObject handle all of the matrix manipulation
|
||||
Parent::setTransform(mat);
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Dirty our network mask so that the new transform gets
|
||||
// transmitted to the client object
|
||||
setMaskBits(TransformMask);
|
||||
}
|
||||
|
||||
U32 SphereEnvironmentProbe::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
|
||||
{
|
||||
// Allow the Parent to get a crack at writing its info
|
||||
U32 retMask = Parent::packUpdate(conn, mask, stream);
|
||||
|
||||
return retMask;
|
||||
}
|
||||
|
||||
void SphereEnvironmentProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
||||
{
|
||||
// Let the Parent read any info it sent
|
||||
Parent::unpackUpdate(conn, stream);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void SphereEnvironmentProbe::updateProbeParams()
|
||||
{
|
||||
Parent::updateProbeParams();
|
||||
|
||||
mProbeInfo->mProbeShapeType = ProbeRenderInst::Sphere;
|
||||
|
||||
PROBEMGR->updateProbes();
|
||||
|
||||
updateCubemaps();
|
||||
}
|
||||
|
||||
void SphereEnvironmentProbe::prepRenderImage(SceneRenderState *state)
|
||||
{
|
||||
if (!mEnabled || !ReflectionProbe::smRenderPreviewProbes)
|
||||
return;
|
||||
|
||||
if (ReflectionProbe::smRenderPreviewProbes && gEditingMission && mEditorShapeInst && mPrefilterMap != nullptr)
|
||||
{
|
||||
GFXTransformSaver saver;
|
||||
|
||||
// Calculate the distance of this object from the camera
|
||||
Point3F cameraOffset;
|
||||
getRenderTransform().getColumn(3, &cameraOffset);
|
||||
cameraOffset -= state->getDiffuseCameraPosition();
|
||||
F32 dist = cameraOffset.len();
|
||||
if (dist < 0.01f)
|
||||
dist = 0.01f;
|
||||
|
||||
// Set up the LOD for the shape
|
||||
F32 invScale = (1.0f / getMax(getMax(mObjScale.x, mObjScale.y), mObjScale.z));
|
||||
|
||||
mEditorShapeInst->setDetailFromDistance(state, dist * invScale);
|
||||
|
||||
// Make sure we have a valid level of detail
|
||||
if (mEditorShapeInst->getCurrentDetail() < 0)
|
||||
return;
|
||||
|
||||
BaseMatInstance* probePrevMat = mEditorShapeInst->getMaterialList()->getMaterialInst(0);
|
||||
|
||||
setPreviewMatParameters(state, probePrevMat);
|
||||
|
||||
// GFXTransformSaver is a handy helper class that restores
|
||||
// the current GFX matrices to their original values when
|
||||
// it goes out of scope at the end of the function
|
||||
|
||||
// Set up our TS render state
|
||||
TSRenderState rdata;
|
||||
rdata.setSceneState(state);
|
||||
rdata.setFadeOverride(1.0f);
|
||||
|
||||
// We might have some forward lit materials
|
||||
// so pass down a query to gather lights.
|
||||
LightQuery query;
|
||||
query.init(getWorldSphere());
|
||||
rdata.setLightQuery(&query);
|
||||
|
||||
// Set the world matrix to the objects render transform
|
||||
MatrixF mat = getRenderTransform();
|
||||
mat.scale(Point3F(1, 1, 1));
|
||||
GFX->setWorldMatrix(mat);
|
||||
|
||||
// Animate the the shape
|
||||
mEditorShapeInst->animate();
|
||||
|
||||
// Allow the shape to submit the RenderInst(s) for itself
|
||||
mEditorShapeInst->render(rdata);
|
||||
|
||||
saver.restore();
|
||||
}
|
||||
|
||||
// If the light is selected or light visualization
|
||||
// is enabled then register the callback.
|
||||
const bool isSelectedInEditor = (gEditingMission && isSelected());
|
||||
if (isSelectedInEditor)
|
||||
{
|
||||
ObjectRenderInst *ri = state->getRenderPass()->allocInst<ObjectRenderInst>();
|
||||
ri->renderDelegate.bind(this, &ReflectionProbe::_onRenderViz);
|
||||
ri->type = RenderPassManager::RIT_Editor;
|
||||
state->getRenderPass()->addInst(ri);
|
||||
}
|
||||
}
|
||||
|
||||
void SphereEnvironmentProbe::setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat)
|
||||
{
|
||||
Parent::setPreviewMatParameters(renderState, mat);
|
||||
}
|
||||
111
Engine/source/T3D/lighting/sphereEnvironmentProbe.h
Normal file
111
Engine/source/T3D/lighting/sphereEnvironmentProbe.h
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef SPHERE_ENVIRONMENT_PROBE_H
|
||||
#define SPHERE_ENVIRONMENT_PROBE_H
|
||||
|
||||
#ifndef REFLECTIONPROBE_H
|
||||
#include "T3D/lighting/reflectionProbe.h"
|
||||
#endif
|
||||
#ifndef _GFXVERTEXBUFFER_H_
|
||||
#include "gfx/gfxVertexBuffer.h"
|
||||
#endif
|
||||
#ifndef _GFXPRIMITIVEBUFFER_H_
|
||||
#include "gfx/gfxPrimitiveBuffer.h"
|
||||
#endif
|
||||
#ifndef _TSSHAPEINSTANCE_H_
|
||||
#include "ts/tsShapeInstance.h"
|
||||
#endif
|
||||
#include "lighting/lightInfo.h"
|
||||
|
||||
#ifndef _RENDERPASSMANAGER_H_
|
||||
#include "renderInstance/renderPassManager.h"
|
||||
#endif
|
||||
|
||||
class BaseMatInstance;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This class implements a basic SceneObject that can exist in the world at a
|
||||
// 3D position and render itself. There are several valid ways to render an
|
||||
// object in Torque. This class implements the preferred rendering method which
|
||||
// is to submit a MeshRenderInst along with a Material, vertex buffer,
|
||||
// primitive buffer, and transform and allow the RenderMeshMgr handle the
|
||||
// actual setup and rendering for you.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class SphereEnvironmentProbe : public ReflectionProbe
|
||||
{
|
||||
typedef ReflectionProbe Parent;
|
||||
|
||||
public:
|
||||
SphereEnvironmentProbe();
|
||||
virtual ~SphereEnvironmentProbe();
|
||||
|
||||
// Declare this object as a ConsoleObject so that we can
|
||||
// instantiate it into the world and network it
|
||||
DECLARE_CONOBJECT(SphereEnvironmentProbe);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Editing
|
||||
// Since there is always a server and a client object in Torque and we
|
||||
// actually edit the server object we need to implement some basic
|
||||
// networking functions
|
||||
//--------------------------------------------------------------------------
|
||||
// Set up any fields that we want to be editable (like position)
|
||||
static void initPersistFields();
|
||||
|
||||
// Allows the object to update its editable settings
|
||||
// from the server object to the client
|
||||
virtual void inspectPostApply();
|
||||
|
||||
// Handle when we are added to the scene and removed from the scene
|
||||
bool onAdd();
|
||||
void onRemove();
|
||||
|
||||
// Override this so that we can dirty the network flag when it is called
|
||||
void setTransform(const MatrixF &mat);
|
||||
|
||||
// This function handles sending the relevant data from the server
|
||||
// object to the client object
|
||||
U32 packUpdate(NetConnection *conn, U32 mask, BitStream *stream);
|
||||
// This function handles receiving relevant data from the server
|
||||
// object and applying it to the client object
|
||||
void unpackUpdate(NetConnection *conn, BitStream *stream);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Object Rendering
|
||||
// Torque utilizes a "batch" rendering system. This means that it builds a
|
||||
// list of objects that need to render (via RenderInst's) and then renders
|
||||
// them all in one batch. This allows it to optimized on things like
|
||||
// minimizing texture, state, and shader switching by grouping objects that
|
||||
// use the same Materials.
|
||||
//--------------------------------------------------------------------------
|
||||
virtual void updateProbeParams();
|
||||
|
||||
// This is the function that allows this object to submit itself for rendering
|
||||
void prepRenderImage(SceneRenderState *state);
|
||||
|
||||
void setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat);
|
||||
};
|
||||
|
||||
#endif // SPHERE_ENVIRONMENT_PROBE_H
|
||||
|
|
@ -82,7 +82,7 @@ ConsoleDocClass( MissionMarker,
|
|||
|
||||
MissionMarker::MissionMarker()
|
||||
{
|
||||
mTypeMask |= StaticObjectType;
|
||||
mTypeMask |= StaticObjectType | MarkerObjectType;
|
||||
mDataBlock = 0;
|
||||
mAddedToScene = false;
|
||||
mNetFlags.set(Ghostable | ScopeAlways);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,10 @@ enum SceneObjectTypeMasks : U32
|
|||
///
|
||||
/// @note Terrains have their own means for rendering inside interior zones.
|
||||
OUTDOOR_OBJECT_TYPEMASK = ( TerrainObjectType |
|
||||
EnvironmentObjectType )
|
||||
EnvironmentObjectType ),
|
||||
|
||||
SKYLIGHT_CAPTURE_TYPEMASK = (EnvironmentObjectType),
|
||||
REFLECTION_PROBE_CAPTURE_TYPEMASK = (StaticObjectType | StaticShapeObjectType)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1176,6 +1176,13 @@ void ShapeBase::onRemove()
|
|||
for (S32 i = 0; i < MaxSoundThreads; i++)
|
||||
stopAudio(i);
|
||||
|
||||
// Accumulation and environment mapping
|
||||
if (isClientObject() && mShapeInstance)
|
||||
{
|
||||
if (mShapeInstance->hasAccumulation())
|
||||
AccumulationVolume::removeObject(this);
|
||||
}
|
||||
|
||||
if ( isClientObject() )
|
||||
{
|
||||
mCubeReflector.unregisterReflector();
|
||||
|
|
@ -3724,6 +3731,18 @@ void ShapeBase::setCurrentWaterObject( WaterObject *obj )
|
|||
mCurrentWaterObject = obj;
|
||||
}
|
||||
|
||||
void ShapeBase::setTransform(const MatrixF & mat)
|
||||
{
|
||||
Parent::setTransform(mat);
|
||||
|
||||
// Accumulation and environment mapping
|
||||
if (isClientObject() && mShapeInstance)
|
||||
{
|
||||
if (mShapeInstance->hasAccumulation())
|
||||
AccumulationVolume::updateObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
void ShapeBase::notifyCollisionCallbacks(SceneObject* obj, const VectorF& vel)
|
||||
{
|
||||
for (S32 i = 0; i < collision_callbacks.size(); i++)
|
||||
|
|
|
|||
|
|
@ -1842,7 +1842,7 @@ public:
|
|||
virtual WaterObject* getCurrentWaterObject();
|
||||
|
||||
void setCurrentWaterObject( WaterObject *obj );
|
||||
|
||||
void setTransform(const MatrixF & mat);
|
||||
virtual F32 getMass() const { return mMass; }
|
||||
|
||||
/// @name Network
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
#pragma once
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
template<typename T>
|
||||
class SystemInterface
|
||||
{
|
||||
public:
|
||||
bool mIsEnabled;
|
||||
bool mIsServer;
|
||||
|
||||
static Vector<T*> all;
|
||||
|
||||
SystemInterface()
|
||||
{
|
||||
all.push_back((T*)this);
|
||||
}
|
||||
|
||||
virtual ~SystemInterface()
|
||||
{
|
||||
for (U32 i = 0; i < all.size(); i++)
|
||||
{
|
||||
if (all[i] == (T*)this)
|
||||
{
|
||||
all.erase(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
template<typename T> Vector<T*> SystemInterface<T>::all(0);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include "scene/sceneRenderState.h"
|
||||
#include "T3D/systems/componentSystem.h"
|
||||
#include "core/util/SystemInterfaceList.h"
|
||||
#include "ts/tsShape.h"
|
||||
#include "ts/tsShapeInstance.h"
|
||||
#include "T3D/assets/ShapeAsset.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include "componentSystem.h"
|
||||
#include "core/util/SystemInterfaceList.h"
|
||||
|
||||
class UpdateSystemInterface : public SystemInterface<UpdateSystemInterface>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -377,6 +377,10 @@ bool TSStatic::_createShape()
|
|||
resetWorldBox();
|
||||
|
||||
mShapeInstance = new TSShapeInstance( mShape, isClientObject() );
|
||||
if (isClientObject())
|
||||
{
|
||||
mShapeInstance->cloneMaterialList();
|
||||
}
|
||||
|
||||
if (isClientObject())
|
||||
mShapeInstance->cloneMaterialList();
|
||||
|
|
|
|||
|
|
@ -748,6 +748,9 @@ class SimObject: public ConsoleObject, public TamlCallbacks
|
|||
/// Performs a safe delayed delete of the object using a sim event.
|
||||
void safeDeleteObject();
|
||||
|
||||
/// Special-case deletion behaviors, largely intended for cleanup in particular cases where it wouldn't happen automatically(like cleanup of associated files)
|
||||
virtual void handleDeleteAction() {}
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Accessors
|
||||
|
|
|
|||
30
Engine/source/core/util/systemInterfaceList.h
Normal file
30
Engine/source/core/util/systemInterfaceList.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
template<typename T>
|
||||
class SystemInterface
|
||||
{
|
||||
public:
|
||||
bool mIsEnabled;
|
||||
bool mIsServer;
|
||||
|
||||
static Vector<T*> all;
|
||||
|
||||
SystemInterface()
|
||||
{
|
||||
all.push_back((T*)this);
|
||||
}
|
||||
|
||||
virtual ~SystemInterface()
|
||||
{
|
||||
for (U32 i = 0; i < all.size(); i++)
|
||||
{
|
||||
if (all[i] == (T*)this)
|
||||
{
|
||||
all.erase(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
template<typename T> Vector<T*> SystemInterface<T>::all(0);
|
||||
|
|
@ -602,6 +602,7 @@ void SkyBox::_initMaterial()
|
|||
desc.setCullMode( GFXCullNone );
|
||||
desc.setBlend( true );
|
||||
desc.setZReadWrite( true, false );
|
||||
desc.zFunc = GFXCmpLessEqual;
|
||||
mMatInstance->addStateBlockDesc( desc );
|
||||
|
||||
// Also disable lighting on the skybox material by default.
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ GFXD3D11Cubemap::GFXD3D11Cubemap() : mTexture(NULL), mSRView(NULL), mDSView(NULL
|
|||
mDynamic = false;
|
||||
mAutoGenMips = false;
|
||||
mFaceFormat = GFXFormatR8G8B8A8;
|
||||
|
||||
for (U32 i = 0; i < CubeFaces; i++)
|
||||
{
|
||||
mRTView[i] = NULL;
|
||||
for(U32 j=0; j < MaxMipMaps; j++)
|
||||
mRTView[i][j] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +50,8 @@ void GFXD3D11Cubemap::releaseSurfaces()
|
|||
|
||||
for (U32 i = 0; i < CubeFaces; i++)
|
||||
{
|
||||
SAFE_RELEASE(mRTView[i]);
|
||||
for (U32 j = 0; j < MaxMipMaps; j++)
|
||||
SAFE_RELEASE(mRTView[i][j]);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(mDSView);
|
||||
|
|
@ -93,7 +94,7 @@ void GFXD3D11Cubemap::initStatic(GFXTexHandle *faces)
|
|||
desc.Width = mTexSize;
|
||||
desc.Height = mTexSize;
|
||||
desc.MipLevels = mAutoGenMips ? 0 : mMipMapLevels;
|
||||
desc.ArraySize = 6;
|
||||
desc.ArraySize = CubeFaces;
|
||||
desc.Format = GFXD3D11TextureFormat[mFaceFormat];
|
||||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
|
|
@ -175,7 +176,7 @@ void GFXD3D11Cubemap::initStatic(DDSFile *dds)
|
|||
continue;
|
||||
|
||||
// convert to Z up
|
||||
const U32 faceIndex = _zUpFaceIndex(currentFace);
|
||||
const U32 faceIndex = zUpFaceIndex(currentFace);
|
||||
|
||||
for(U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
{
|
||||
|
|
@ -209,16 +210,20 @@ void GFXD3D11Cubemap::initStatic(DDSFile *dds)
|
|||
}
|
||||
}
|
||||
|
||||
void GFXD3D11Cubemap::initDynamic(U32 texSize, GFXFormat faceFormat)
|
||||
void GFXD3D11Cubemap::initDynamic(U32 texSize, GFXFormat faceFormat, U32 mipLevels)
|
||||
{
|
||||
if(!mDynamic)
|
||||
GFXTextureManager::addEventDelegate(this, &GFXD3D11Cubemap::_onTextureEvent);
|
||||
|
||||
mDynamic = true;
|
||||
mAutoGenMips = true;
|
||||
mTexSize = texSize;
|
||||
mFaceFormat = faceFormat;
|
||||
mMipMapLevels = 0;
|
||||
if (!mipLevels)
|
||||
mAutoGenMips = true;
|
||||
|
||||
mMipMapLevels = mipLevels;
|
||||
|
||||
|
||||
bool compressed = ImageUtil::isCompressedFormat(mFaceFormat);
|
||||
|
||||
UINT bindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
|
|
@ -233,7 +238,7 @@ void GFXD3D11Cubemap::initDynamic(U32 texSize, GFXFormat faceFormat)
|
|||
|
||||
desc.Width = mTexSize;
|
||||
desc.Height = mTexSize;
|
||||
desc.MipLevels = 0;
|
||||
desc.MipLevels = mMipMapLevels;
|
||||
desc.ArraySize = 6;
|
||||
desc.Format = GFXD3D11TextureFormat[mFaceFormat];
|
||||
desc.SampleDesc.Count = 1;
|
||||
|
|
@ -249,7 +254,7 @@ void GFXD3D11Cubemap::initDynamic(U32 texSize, GFXFormat faceFormat)
|
|||
D3D11_SHADER_RESOURCE_VIEW_DESC SMViewDesc;
|
||||
SMViewDesc.Format = GFXD3D11TextureFormat[mFaceFormat];
|
||||
SMViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE;
|
||||
SMViewDesc.TextureCube.MipLevels = -1;
|
||||
SMViewDesc.TextureCube.MipLevels = mAutoGenMips ? -1 : mMipMapLevels;
|
||||
SMViewDesc.TextureCube.MostDetailedMip = 0;
|
||||
|
||||
hr = D3D11DEVICE->CreateShaderResourceView(mTexture, &SMViewDesc, &mSRView);
|
||||
|
|
@ -274,18 +279,21 @@ void GFXD3D11Cubemap::initDynamic(U32 texSize, GFXFormat faceFormat)
|
|||
viewDesc.Format = desc.Format;
|
||||
viewDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
|
||||
viewDesc.Texture2DArray.ArraySize = 1;
|
||||
viewDesc.Texture2DArray.MipSlice = 0;
|
||||
|
||||
for (U32 i = 0; i < CubeFaces; i++)
|
||||
{
|
||||
viewDesc.Texture2DArray.FirstArraySlice = i;
|
||||
hr = D3D11DEVICE->CreateRenderTargetView(mTexture, &viewDesc, &mRTView[i]);
|
||||
{
|
||||
viewDesc.Texture2DArray.FirstArraySlice = i;
|
||||
for (U32 j = 0; j < mMipMapLevels; j++)
|
||||
{
|
||||
viewDesc.Texture2DArray.MipSlice = j;
|
||||
hr = D3D11DEVICE->CreateRenderTargetView(mTexture, &viewDesc, &mRTView[i][j]);
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
AssertFatal(false, "GFXD3D11Cubemap::initDynamic - CreateRenderTargetView call failure");
|
||||
}
|
||||
}
|
||||
if (FAILED(hr))
|
||||
{
|
||||
AssertFatal(false, "GFXD3D11Cubemap::initDynamic - CreateRenderTargetView call failure");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
D3D11_TEXTURE2D_DESC depthTexDesc;
|
||||
depthTexDesc.Width = mTexSize;
|
||||
|
|
@ -352,16 +360,11 @@ ID3D11ShaderResourceView* GFXD3D11Cubemap::getSRView()
|
|||
return mSRView;
|
||||
}
|
||||
|
||||
ID3D11RenderTargetView* GFXD3D11Cubemap::getRTView(U32 faceIdx)
|
||||
ID3D11RenderTargetView* GFXD3D11Cubemap::getRTView(U32 faceIdx, U32 mipIndex)
|
||||
{
|
||||
AssertFatal(faceIdx < CubeFaces, "GFXD3D11Cubemap::getRTView - face index out of bounds");
|
||||
|
||||
return mRTView[faceIdx];
|
||||
}
|
||||
|
||||
ID3D11RenderTargetView** GFXD3D11Cubemap::getRTViewArray()
|
||||
{
|
||||
return mRTView;
|
||||
return mRTView[faceIdx][mipIndex];
|
||||
}
|
||||
|
||||
ID3D11DepthStencilView* GFXD3D11Cubemap::getDSView()
|
||||
|
|
@ -372,4 +375,197 @@ ID3D11DepthStencilView* GFXD3D11Cubemap::getDSView()
|
|||
ID3D11Texture2D* GFXD3D11Cubemap::get2DTex()
|
||||
{
|
||||
return mTexture;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Cubemap Array
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GFXD3D11CubemapArray::GFXD3D11CubemapArray() : mTexture(NULL), mSRView(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
GFXD3D11CubemapArray::~GFXD3D11CubemapArray()
|
||||
{
|
||||
SAFE_RELEASE(mSRView);
|
||||
SAFE_RELEASE(mTexture);
|
||||
}
|
||||
|
||||
//TODO: really need a common private 'init' function to avoid code double up with these init* functions
|
||||
void GFXD3D11CubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
|
||||
{
|
||||
AssertFatal(cubemaps, "GFXD3D11CubemapArray::initStatic - Got null GFXCubemapHandle!");
|
||||
AssertFatal(*cubemaps, "GFXD3D11CubemapArray::initStatic - Got empty cubemap!");
|
||||
|
||||
//all cubemaps must be the same size,format and number of mipmaps. Grab the details from the first cubemap
|
||||
mSize = cubemaps[0]->getSize();
|
||||
mFormat = cubemaps[0]->getFormat();
|
||||
mMipMapLevels = cubemaps[0]->getMipMapLevels();
|
||||
mNumCubemaps = cubemapCount;
|
||||
|
||||
//create texture object
|
||||
UINT bindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
UINT miscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
|
||||
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(D3D11_TEXTURE2D_DESC));
|
||||
desc.Width = mSize;
|
||||
desc.Height = mSize;
|
||||
desc.MipLevels = mMipMapLevels;
|
||||
desc.ArraySize = CubeFaces * cubemapCount;
|
||||
desc.Format = GFXD3D11TextureFormat[mFormat];
|
||||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
desc.Usage = D3D11_USAGE_DEFAULT;
|
||||
desc.BindFlags = bindFlags;
|
||||
desc.MiscFlags = miscFlags;
|
||||
desc.CPUAccessFlags = 0;
|
||||
|
||||
HRESULT hr = D3D11DEVICE->CreateTexture2D(&desc, NULL, &mTexture);
|
||||
|
||||
if (FAILED(hr))
|
||||
AssertFatal(false, "GFXD3D11CubemapArray::initStatic - CreateTexture2D failure");
|
||||
|
||||
for (U32 i = 0; i < cubemapCount; i++)
|
||||
{
|
||||
GFXD3D11Cubemap *cubeObj = static_cast<GFXD3D11Cubemap*>((GFXCubemap*)cubemaps[i]);
|
||||
//yes checking the first one(cubemap at index 0) is pointless but saves a further if statement
|
||||
if (cubemaps[i]->getSize() != mSize || cubemaps[i]->getFormat() != mFormat || cubemaps[i]->getMipMapLevels() != mMipMapLevels)
|
||||
{
|
||||
Con::printf("Trying to add an invalid Cubemap to a CubemapArray");
|
||||
//destroy array here first
|
||||
AssertFatal(false, "GFXD3D11CubemapArray::initStatic - invalid cubemap");
|
||||
}
|
||||
|
||||
for (U32 face = 0; face < CubeFaces; face++)
|
||||
{
|
||||
const U32 arraySlice = face + CubeFaces * i;
|
||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
{
|
||||
const U32 srcSubResource = D3D11CalcSubresource(currentMip, face, mMipMapLevels);
|
||||
const U32 dstSubResource = D3D11CalcSubresource(currentMip, arraySlice, mMipMapLevels);
|
||||
D3D11DEVICECONTEXT->CopySubresourceRegion(mTexture, dstSubResource, 0, 0, 0, cubeObj->get2DTex(), srcSubResource, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//create shader resource view
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC SMViewDesc;
|
||||
SMViewDesc.Format = GFXD3D11TextureFormat[mFormat];
|
||||
SMViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBEARRAY;
|
||||
SMViewDesc.TextureCubeArray.MipLevels = mMipMapLevels;
|
||||
SMViewDesc.TextureCubeArray.MostDetailedMip = 0;
|
||||
SMViewDesc.TextureCubeArray.NumCubes = mNumCubemaps;
|
||||
SMViewDesc.TextureCubeArray.First2DArrayFace = 0;
|
||||
|
||||
hr = D3D11DEVICE->CreateShaderResourceView(mTexture, &SMViewDesc, &mSRView);
|
||||
if (FAILED(hr))
|
||||
AssertFatal(false, "GFXD3D11CubemapArray::initStatic - shader resource view creation failure");
|
||||
|
||||
}
|
||||
|
||||
//Just allocate the cubemap array but we don't upload any data
|
||||
void GFXD3D11CubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format)
|
||||
{
|
||||
mSize = cubemapFaceSize;
|
||||
mMipMapLevels = ImageUtil::getMaxMipCount(cubemapFaceSize, cubemapFaceSize);
|
||||
mNumCubemaps = cubemapCount;
|
||||
mFormat = format;
|
||||
|
||||
//create texture object
|
||||
UINT bindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
UINT miscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
|
||||
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
ZeroMemory(&desc, sizeof(D3D11_TEXTURE2D_DESC));
|
||||
desc.Width = mSize;
|
||||
desc.Height = mSize;
|
||||
desc.MipLevels = mMipMapLevels;
|
||||
desc.ArraySize = CubeFaces * cubemapCount;
|
||||
desc.Format = GFXD3D11TextureFormat[mFormat];
|
||||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
desc.Usage = D3D11_USAGE_DEFAULT;
|
||||
desc.BindFlags = bindFlags;
|
||||
desc.MiscFlags = miscFlags;
|
||||
desc.CPUAccessFlags = 0;
|
||||
|
||||
HRESULT hr = D3D11DEVICE->CreateTexture2D(&desc, NULL, &mTexture);
|
||||
|
||||
if (FAILED(hr))
|
||||
AssertFatal(false, "GFXD3D11CubemapArray::initStatic - CreateTexture2D failure");
|
||||
|
||||
//create shader resource view
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC SMViewDesc;
|
||||
SMViewDesc.Format = GFXD3D11TextureFormat[mFormat];
|
||||
SMViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBEARRAY;
|
||||
SMViewDesc.TextureCubeArray.MipLevels = mMipMapLevels;
|
||||
SMViewDesc.TextureCubeArray.MostDetailedMip = 0;
|
||||
SMViewDesc.TextureCubeArray.NumCubes = mNumCubemaps;
|
||||
SMViewDesc.TextureCubeArray.First2DArrayFace = 0;
|
||||
|
||||
hr = D3D11DEVICE->CreateShaderResourceView(mTexture, &SMViewDesc, &mSRView);
|
||||
if (FAILED(hr))
|
||||
AssertFatal(false, "GFXD3D11CubemapArray::initStatic - shader resource view creation failure");
|
||||
|
||||
}
|
||||
|
||||
void GFXD3D11CubemapArray::updateTexture(const GFXCubemapHandle &cubemap, const U32 slot)
|
||||
{
|
||||
AssertFatal(slot <= mNumCubemaps, "GFXD3D11CubemapArray::updateTexture - trying to update a cubemap texture that is out of bounds!");
|
||||
AssertFatal(mFormat == cubemap->getFormat(), "GFXD3D11CubemapArray::updateTexture - Destination format doesn't match");
|
||||
AssertFatal(mSize == cubemap->getSize(), "GFXD3D11CubemapArray::updateTexture - Destination size doesn't match");
|
||||
AssertFatal(mMipMapLevels == cubemap->getMipMapLevels(), "GFXD3D11CubemapArray::updateTexture - Destination mip levels doesn't match");
|
||||
|
||||
GFXD3D11Cubemap *pCubeObj = static_cast<GFXD3D11Cubemap*>((GFXCubemap*)cubemap);
|
||||
ID3D11Resource *pDstRes = pCubeObj->get2DTex();
|
||||
for (U32 face = 0; face < CubeFaces; face++)
|
||||
{
|
||||
const U32 arraySlice = face + CubeFaces * slot;
|
||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
{
|
||||
const U32 srcSubResource = D3D11CalcSubresource(currentMip, face, mMipMapLevels);
|
||||
const U32 dstSubResource = D3D11CalcSubresource(currentMip, arraySlice, mMipMapLevels);
|
||||
D3D11DEVICECONTEXT->CopySubresourceRegion(mTexture, dstSubResource, 0, 0, 0, pDstRes, srcSubResource, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GFXD3D11CubemapArray::copyTo(GFXCubemapArray *pDstCubemap)
|
||||
{
|
||||
AssertFatal(pDstCubemap, "GFXD3D11CubemapArray::copyTo - Got null GFXCubemapArray");
|
||||
AssertFatal(pDstCubemap->getNumCubemaps() > mNumCubemaps, "GFXD3D11CubemapArray::copyTo - Destination too small");
|
||||
AssertFatal(pDstCubemap->getFormat() == mFormat, "GFXD3D11CubemapArray::copyTo - Destination format doesn't match");
|
||||
AssertFatal(pDstCubemap->getSize() == mSize, "GFXD3D11CubemapArray::copyTo - Destination size doesn't match");
|
||||
AssertFatal(pDstCubemap->getMipMapLevels() == mMipMapLevels, "GFXD3D11CubemapArray::copyTo - Destination mip levels doesn't match");
|
||||
|
||||
GFXD3D11CubemapArray *pDstCube = static_cast<GFXD3D11CubemapArray*>(pDstCubemap);
|
||||
ID3D11Resource *pDstRes = pDstCube->get2DTex();
|
||||
for (U32 cubeMap = 0; cubeMap < mNumCubemaps; cubeMap++)
|
||||
{
|
||||
for (U32 face = 0; face < CubeFaces; face++)
|
||||
{
|
||||
const U32 arraySlice = face + CubeFaces * cubeMap;
|
||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
{
|
||||
const U32 subResource = D3D11CalcSubresource(currentMip, arraySlice, mMipMapLevels);
|
||||
D3D11DEVICECONTEXT->CopySubresourceRegion(pDstRes, subResource, 0, 0, 0, mTexture, subResource, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GFXD3D11CubemapArray::setToTexUnit(U32 tuNum)
|
||||
{
|
||||
D3D11DEVICECONTEXT->PSSetShaderResources(tuNum, 1, &mSRView);
|
||||
}
|
||||
|
||||
void GFXD3D11CubemapArray::zombify()
|
||||
{
|
||||
// Static cubemaps are handled by D3D
|
||||
}
|
||||
|
||||
void GFXD3D11CubemapArray::resurrect()
|
||||
{
|
||||
// Static cubemaps are handled by D3D
|
||||
}
|
||||
|
|
@ -29,13 +29,14 @@
|
|||
#include "gfx/gfxTarget.h"
|
||||
|
||||
const U32 CubeFaces = 6;
|
||||
const U32 MaxMipMaps = 13; //todo this needs a proper static value somewhere to sync up with other classes like GBitmap
|
||||
|
||||
class GFXD3D11Cubemap : public GFXCubemap
|
||||
{
|
||||
public:
|
||||
virtual void initStatic( GFXTexHandle *faces );
|
||||
virtual void initStatic( DDSFile *dds );
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8 );
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0);
|
||||
virtual void setToTexUnit( U32 tuNum );
|
||||
virtual U32 getSize() const { return mTexSize; }
|
||||
virtual GFXFormat getFormat() const { return mFaceFormat; }
|
||||
|
|
@ -47,10 +48,11 @@ public:
|
|||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
|
||||
virtual bool isInitialized() { return mTexture ? true : false; }
|
||||
|
||||
// Get functions
|
||||
ID3D11ShaderResourceView* getSRView();
|
||||
ID3D11RenderTargetView* getRTView(U32 faceIdx);
|
||||
ID3D11RenderTargetView** getRTViewArray();
|
||||
ID3D11RenderTargetView* getRTView(U32 faceIdx, U32 mipIndex=0);
|
||||
ID3D11DepthStencilView* getDSView();
|
||||
ID3D11Texture2D* get2DTex();
|
||||
|
||||
|
|
@ -61,7 +63,7 @@ private:
|
|||
|
||||
ID3D11Texture2D* mTexture;
|
||||
ID3D11ShaderResourceView* mSRView; // for shader resource input
|
||||
ID3D11RenderTargetView* mRTView[CubeFaces]; // for render targets, 6 faces of the cubemap
|
||||
ID3D11RenderTargetView* mRTView[CubeFaces][MaxMipMaps]; // for render targets, 6 faces of the cubemap
|
||||
ID3D11DepthStencilView* mDSView; //render target view for depth stencil
|
||||
|
||||
bool mAutoGenMips;
|
||||
|
|
@ -76,4 +78,30 @@ private:
|
|||
void _onTextureEvent(GFXTexCallbackCode code);
|
||||
};
|
||||
|
||||
class GFXD3D11CubemapArray : public GFXCubemapArray
|
||||
{
|
||||
public:
|
||||
GFXD3D11CubemapArray();
|
||||
virtual ~GFXD3D11CubemapArray();
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount);
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format);
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot);
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap);
|
||||
virtual void setToTexUnit(U32 tuNum);
|
||||
|
||||
ID3D11ShaderResourceView* getSRView() { return mSRView; }
|
||||
ID3D11Texture2D* get2DTex() { return mTexture; }
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify();
|
||||
virtual void resurrect();
|
||||
|
||||
private:
|
||||
friend class GFXD3D11TextureTarget;
|
||||
friend class GFXD3D11Device;
|
||||
|
||||
ID3D11Texture2D *mTexture;
|
||||
ID3D11ShaderResourceView* mSRView; // for shader resource input
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,12 +38,14 @@
|
|||
#include "gfx/D3D11/screenshotD3D11.h"
|
||||
#include "materials/shaderData.h"
|
||||
#include "shaderGen/shaderGen.h"
|
||||
#include <d3d9.h> //d3dperf
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
#include "d3d11sdklayers.h"
|
||||
#endif
|
||||
|
||||
#pragma comment(lib, "dxgi.lib")
|
||||
#pragma comment(lib, "d3d9.lib") //d3dperf
|
||||
#pragma comment(lib, "d3d11.lib")
|
||||
|
||||
class GFXPCD3D11RegisterDevice
|
||||
|
|
@ -90,9 +92,6 @@ GFXD3D11Device::GFXD3D11Device(U32 index)
|
|||
mAdapterIndex = index;
|
||||
mD3DDevice = NULL;
|
||||
mD3DDeviceContext = NULL;
|
||||
mD3DDevice1 = NULL;
|
||||
mD3DDeviceContext1 = NULL;
|
||||
mUserAnnotation = NULL;
|
||||
mVolatileVB = NULL;
|
||||
|
||||
mCurrentPB = NULL;
|
||||
|
|
@ -126,7 +125,6 @@ GFXD3D11Device::GFXD3D11Device(U32 index)
|
|||
mCurrentConstBuffer = NULL;
|
||||
|
||||
mOcclusionQuerySupported = false;
|
||||
mCbufferPartialSupported = false;
|
||||
|
||||
mDebugLayers = false;
|
||||
|
||||
|
|
@ -166,8 +164,6 @@ GFXD3D11Device::~GFXD3D11Device()
|
|||
SAFE_RELEASE(mDeviceBackBufferView);
|
||||
SAFE_RELEASE(mDeviceDepthStencil);
|
||||
SAFE_RELEASE(mDeviceBackbuffer);
|
||||
SAFE_RELEASE(mUserAnnotation);
|
||||
SAFE_RELEASE(mD3DDeviceContext1);
|
||||
SAFE_RELEASE(mD3DDeviceContext);
|
||||
|
||||
SAFE_DELETE(mCardProfiler);
|
||||
|
|
@ -185,7 +181,6 @@ GFXD3D11Device::~GFXD3D11Device()
|
|||
#endif
|
||||
|
||||
SAFE_RELEASE(mSwapChain);
|
||||
SAFE_RELEASE(mD3DDevice1);
|
||||
SAFE_RELEASE(mD3DDevice);
|
||||
}
|
||||
|
||||
|
|
@ -439,6 +434,7 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
|
|||
AssertFatal(window, "GFXD3D11Device::init - must specify a window!");
|
||||
|
||||
HWND winHwnd = (HWND)window->getSystemWindow( PlatformWindow::WindowSystem_Windows );
|
||||
SetFocus(winHwnd);
|
||||
|
||||
UINT createDeviceFlags = D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||
#ifdef TORQUE_DEBUG
|
||||
|
|
@ -449,7 +445,7 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
|
|||
DXGI_SWAP_CHAIN_DESC d3dpp = setupPresentParams(mode, winHwnd);
|
||||
|
||||
// TODO support at least feature level 10 to match GL
|
||||
D3D_FEATURE_LEVEL pFeatureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0 };
|
||||
D3D_FEATURE_LEVEL pFeatureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1 };
|
||||
U32 nFeatureCount = ARRAYSIZE(pFeatureLevels);
|
||||
D3D_DRIVER_TYPE driverType = D3D_DRIVER_TYPE_HARDWARE;// use D3D_DRIVER_TYPE_REFERENCE for reference device
|
||||
// create a device, device context and swap chain using the information in the d3dpp struct
|
||||
|
|
@ -489,26 +485,6 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
|
|||
#endif
|
||||
}
|
||||
|
||||
// Grab DX 11.1 device and context if available and also ID3DUserDefinedAnnotation
|
||||
hres = mD3DDevice->QueryInterface(__uuidof(ID3D11Device1), reinterpret_cast<void**>(&mD3DDevice1));
|
||||
if (SUCCEEDED(hres))
|
||||
{
|
||||
//11.1 context
|
||||
mD3DDeviceContext->QueryInterface(__uuidof(ID3D11DeviceContext1), reinterpret_cast<void**>(&mD3DDeviceContext1));
|
||||
// ID3DUserDefinedAnnotation
|
||||
mD3DDeviceContext->QueryInterface(IID_PPV_ARGS(&mUserAnnotation));
|
||||
//Check what is supported, windows 7 supports very little from 11.1
|
||||
D3D11_FEATURE_DATA_D3D11_OPTIONS options;
|
||||
mD3DDevice1->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS, &options,
|
||||
sizeof(D3D11_FEATURE_DATA_D3D11_OPTIONS));
|
||||
|
||||
//Cbuffer partial updates
|
||||
if (options.ConstantBufferOffsetting && options.ConstantBufferPartialUpdate)
|
||||
mCbufferPartialSupported = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//set the fullscreen state here if we need to
|
||||
if(mode.fullScreen)
|
||||
{
|
||||
|
|
@ -689,9 +665,9 @@ GFXWindowTarget * GFXD3D11Device::allocWindowTarget(PlatformWindow *window)
|
|||
return gdwt;
|
||||
}
|
||||
|
||||
GFXTextureTarget* GFXD3D11Device::allocRenderToTextureTarget()
|
||||
GFXTextureTarget* GFXD3D11Device::allocRenderToTextureTarget(bool genMips)
|
||||
{
|
||||
GFXD3D11TextureTarget *targ = new GFXD3D11TextureTarget();
|
||||
GFXD3D11TextureTarget *targ = new GFXD3D11TextureTarget(genMips);
|
||||
targ->registerResourceWithDevice(this);
|
||||
|
||||
return targ;
|
||||
|
|
@ -933,6 +909,25 @@ void GFXD3D11Device::setShaderConstBufferInternal(GFXShaderConstBuffer* buffer)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void GFXD3D11Device::copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face)
|
||||
{
|
||||
AssertFatal(pDst, "GFXD3D11Device::copyResource: Destination texture is null");
|
||||
AssertFatal(pSrc, "GFXD3D11Device::copyResource: Source cubemap is null");
|
||||
|
||||
GFXD3D11TextureObject *pD3DDst = static_cast<GFXD3D11TextureObject*>(pDst);
|
||||
GFXD3D11Cubemap *pD3DSrc = static_cast<GFXD3D11Cubemap*>(pSrc);
|
||||
|
||||
const U32 mipLevels = pD3DSrc->getMipMapLevels();
|
||||
for (U32 mip = 0; mip < mipLevels; mip++)
|
||||
{
|
||||
const U32 srcSubResource = D3D11CalcSubresource(mip, face, mipLevels);
|
||||
const U32 dstSubResource = D3D11CalcSubresource(mip, 0, mipLevels);
|
||||
mD3DDeviceContext->CopySubresourceRegion(pD3DDst->get2DTex(), dstSubResource, 0, 0, 0, pD3DSrc->get2DTex(), srcSubResource, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void GFXD3D11Device::clear(U32 flags, const LinearColorF& color, F32 z, U32 stencil)
|
||||
{
|
||||
// Make sure we have flushed our render target state.
|
||||
|
|
@ -940,15 +935,22 @@ void GFXD3D11Device::clear(U32 flags, const LinearColorF& color, F32 z, U32 sten
|
|||
|
||||
UINT depthstencilFlag = 0;
|
||||
|
||||
ID3D11RenderTargetView* rtView = NULL;
|
||||
//TODO: current support is 5 render targets, clean this up
|
||||
ID3D11RenderTargetView* rtView[5] = { NULL };
|
||||
ID3D11DepthStencilView* dsView = NULL;
|
||||
|
||||
mD3DDeviceContext->OMGetRenderTargets(1, &rtView, &dsView);
|
||||
mD3DDeviceContext->OMGetRenderTargets(5, rtView, &dsView);
|
||||
|
||||
const FLOAT clearColor[4] = { color.red, color.green, color.blue, color.alpha };
|
||||
|
||||
if (flags & GFXClearTarget && rtView)
|
||||
mD3DDeviceContext->ClearRenderTargetView(rtView, clearColor);
|
||||
{
|
||||
for (U32 i = 0; i < 5; i++)
|
||||
{
|
||||
if (rtView[i])
|
||||
mD3DDeviceContext->ClearRenderTargetView(rtView[i], clearColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & GFXClearZBuffer)
|
||||
depthstencilFlag |= D3D11_CLEAR_DEPTH;
|
||||
|
|
@ -959,10 +961,30 @@ void GFXD3D11Device::clear(U32 flags, const LinearColorF& color, F32 z, U32 sten
|
|||
if (depthstencilFlag && dsView)
|
||||
mD3DDeviceContext->ClearDepthStencilView(dsView, depthstencilFlag, z, stencil);
|
||||
|
||||
SAFE_RELEASE(rtView);
|
||||
for (U32 i = 0; i < 5; i++)
|
||||
SAFE_RELEASE(rtView[i]);
|
||||
SAFE_RELEASE(dsView);
|
||||
}
|
||||
|
||||
void GFXD3D11Device::clearColorAttachment(const U32 attachment, const LinearColorF& color)
|
||||
{
|
||||
GFXD3D11TextureTarget *pTarget = static_cast<GFXD3D11TextureTarget*>(mCurrentRT.getPointer());
|
||||
ID3D11RenderTargetView* rtView = NULL;
|
||||
|
||||
if (!pTarget)
|
||||
{
|
||||
rtView = mDeviceBackBufferView;// we are using the default backbuffer
|
||||
}
|
||||
else
|
||||
{
|
||||
//attachment + 1 to skip past DepthStencil which is first in the list
|
||||
rtView = static_cast<ID3D11RenderTargetView*>(pTarget->mTargetViews[attachment + 1]);
|
||||
}
|
||||
|
||||
const FLOAT clearColor[4] = { color.red, color.green, color.blue, color.alpha };
|
||||
mD3DDeviceContext->ClearRenderTargetView(rtView, clearColor);
|
||||
}
|
||||
|
||||
void GFXD3D11Device::endSceneInternal()
|
||||
{
|
||||
mCanCurrentlyRender = false;
|
||||
|
|
@ -1837,32 +1859,38 @@ GFXCubemap * GFXD3D11Device::createCubemap()
|
|||
return cube;
|
||||
}
|
||||
|
||||
GFXCubemapArray * GFXD3D11Device::createCubemapArray()
|
||||
{
|
||||
GFXD3D11CubemapArray* cubeArray = new GFXD3D11CubemapArray();
|
||||
cubeArray->registerResourceWithDevice(this);
|
||||
return cubeArray;
|
||||
}
|
||||
|
||||
// Debug events
|
||||
//------------------------------------------------------------------------------
|
||||
void GFXD3D11Device::enterDebugEvent(ColorI color, const char *name)
|
||||
{
|
||||
if (mUserAnnotation)
|
||||
{
|
||||
WCHAR eventName[260];
|
||||
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
|
||||
mUserAnnotation->BeginEvent(eventName);
|
||||
}
|
||||
// BJGFIX
|
||||
WCHAR eventName[260];
|
||||
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
|
||||
|
||||
D3DPERF_BeginEvent(D3DCOLOR_ARGB(color.alpha, color.red, color.green, color.blue),
|
||||
(LPCWSTR)&eventName);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void GFXD3D11Device::leaveDebugEvent()
|
||||
{
|
||||
if (mUserAnnotation)
|
||||
mUserAnnotation->EndEvent();
|
||||
D3DPERF_EndEvent();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void GFXD3D11Device::setDebugMarker(ColorI color, const char *name)
|
||||
{
|
||||
if (mUserAnnotation)
|
||||
{
|
||||
WCHAR eventName[260];
|
||||
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
|
||||
mUserAnnotation->SetMarker(eventName);
|
||||
}
|
||||
// BJGFIX
|
||||
WCHAR eventName[260];
|
||||
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
|
||||
|
||||
D3DPERF_SetMarker(D3DCOLOR_ARGB(color.alpha, color.red, color.green, color.blue),
|
||||
(LPCWSTR)&eventName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,9 +39,6 @@
|
|||
#define D3D11 static_cast<GFXD3D11Device*>(GFX)
|
||||
#define D3D11DEVICE D3D11->getDevice()
|
||||
#define D3D11DEVICECONTEXT D3D11->getDeviceContext()
|
||||
// DX 11.1 - always check these are not NULL, dodgy support with win 7
|
||||
#define D3D11DEVICE1 D3D11->getDevice1()
|
||||
#define D3D11DEVICECONTEXT1 D3D11->getDeviceContext1()
|
||||
|
||||
class PlatformWindow;
|
||||
class GFXD3D11ShaderConstBuffer;
|
||||
|
|
@ -71,7 +68,7 @@ private:
|
|||
virtual void enumerateVideoModes();
|
||||
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window);
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget();
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true);
|
||||
|
||||
virtual void enterDebugEvent(ColorI color, const char *name);
|
||||
virtual void leaveDebugEvent();
|
||||
|
|
@ -129,10 +126,6 @@ protected:
|
|||
IDXGISwapChain *mSwapChain;
|
||||
ID3D11Device* mD3DDevice;
|
||||
ID3D11DeviceContext* mD3DDeviceContext;
|
||||
// DX 11.1
|
||||
ID3D11Device1* mD3DDevice1;
|
||||
ID3D11DeviceContext1* mD3DDeviceContext1;
|
||||
ID3DUserDefinedAnnotation* mUserAnnotation;
|
||||
|
||||
GFXShaderRef mGenericShader[GS_COUNT];
|
||||
GFXShaderConstBufferRef mGenericShaderBuffer[GS_COUNT];
|
||||
|
|
@ -153,7 +146,6 @@ protected:
|
|||
DXGI_SAMPLE_DESC mMultisampleDesc;
|
||||
|
||||
bool mOcclusionQuerySupported;
|
||||
bool mCbufferPartialSupported;
|
||||
|
||||
U32 mDrawInstancesCount;
|
||||
|
||||
|
|
@ -237,6 +229,7 @@ public:
|
|||
U32 getAdaterIndex() const { return mAdapterIndex; }
|
||||
|
||||
virtual GFXCubemap *createCubemap();
|
||||
virtual GFXCubemapArray *createCubemapArray();
|
||||
|
||||
virtual F32 getPixelShaderVersion() const { return mPixVersion; }
|
||||
virtual void setPixelShaderVersion( F32 version ){ mPixVersion = version;}
|
||||
|
|
@ -246,9 +239,16 @@ public:
|
|||
virtual U32 getNumRenderTargets() const { return 8; }
|
||||
// }
|
||||
|
||||
// Copy methods
|
||||
// {
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face);
|
||||
// }
|
||||
|
||||
// Misc rendering control
|
||||
// {
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil );
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color);
|
||||
|
||||
virtual bool beginSceneInternal();
|
||||
virtual void endSceneInternal();
|
||||
|
||||
|
|
@ -297,9 +297,6 @@ public:
|
|||
ID3D11DeviceContext* getDeviceContext(){ return mD3DDeviceContext; }
|
||||
ID3D11Device* getDevice(){ return mD3DDevice; }
|
||||
IDXGISwapChain* getSwapChain() { return mSwapChain; }
|
||||
//DX 11.1
|
||||
ID3D11DeviceContext1* getDeviceContext1() { return mD3DDeviceContext1; }
|
||||
ID3D11Device1* getDevice1() { return mD3DDevice1; }
|
||||
|
||||
/// Reset
|
||||
void reset( DXGI_SWAP_CHAIN_DESC &d3dpp );
|
||||
|
|
@ -325,7 +322,7 @@ public:
|
|||
|
||||
// grab the sampler map
|
||||
const SamplerMap &getSamplersMap() const { return mSamplersMap; }
|
||||
SamplerMap &getSamplersMap() { return mSamplersMap; }
|
||||
SamplerMap &getSamplersMap(){ return mSamplersMap; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ void GFXD3D11EnumTranslate::init()
|
|||
GFXD3D11TextureFormat[GFXFormatR16F] = DXGI_FORMAT_R16_FLOAT;
|
||||
GFXD3D11TextureFormat[GFXFormatR16G16F] = DXGI_FORMAT_R16G16_FLOAT;
|
||||
GFXD3D11TextureFormat[GFXFormatR10G10B10A2] = DXGI_FORMAT_R10G10B10A2_UNORM;
|
||||
GFXD3D11TextureFormat[GFXFormatR11G11B10] = DXGI_FORMAT_R11G11B10_FLOAT;
|
||||
GFXD3D11TextureFormat[GFXFormatD32] = DXGI_FORMAT_UNKNOWN;
|
||||
GFXD3D11TextureFormat[GFXFormatD24X8] = DXGI_FORMAT_UNKNOWN;
|
||||
GFXD3D11TextureFormat[GFXFormatD24S8] = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
GFXD3D11OcclusionQuery::GFXD3D11OcclusionQuery(GFXDevice *device)
|
||||
: GFXOcclusionQuery(device),
|
||||
mQuery(NULL)
|
||||
mQuery(NULL),
|
||||
mTesting(false)
|
||||
{
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
mTimer = PlatformTimer::create();
|
||||
|
|
@ -73,8 +74,11 @@ bool GFXD3D11OcclusionQuery::begin()
|
|||
AssertISV(hRes != E_OUTOFMEMORY, "GFXD3D11OcclusionQuery::begin - Out of memory");
|
||||
}
|
||||
|
||||
// Add a begin marker to the command buffer queue.
|
||||
D3D11DEVICECONTEXT->Begin(mQuery);
|
||||
if (!mTesting)
|
||||
{
|
||||
D3D11DEVICECONTEXT->Begin(mQuery);
|
||||
mTesting = true;
|
||||
}
|
||||
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
mBeginFrame = GuiTSCtrl::getFrameCount();
|
||||
|
|
@ -90,6 +94,7 @@ void GFXD3D11OcclusionQuery::end()
|
|||
|
||||
// Add an end marker to the command buffer queue.
|
||||
D3D11DEVICECONTEXT->End(mQuery);
|
||||
mTesting = false;
|
||||
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
AssertFatal( mBeginFrame == GuiTSCtrl::getFrameCount(), "GFXD3D11OcclusionQuery::end - ended query on different frame than begin!" );
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class GFXD3D11OcclusionQuery : public GFXOcclusionQuery
|
|||
{
|
||||
private:
|
||||
mutable ID3D11Query *mQuery;
|
||||
|
||||
bool mTesting;
|
||||
#ifdef TORQUE_GATHER_METRICS
|
||||
U32 mBeginFrame;
|
||||
U32 mTimeSinceEnd;
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ const String GFXD3D11ShaderConstBuffer::describeSelf() const
|
|||
GenericConstBufferLayout::ParamDesc pd;
|
||||
mVertexConstBufferLayout->getDesc(i, pd);
|
||||
|
||||
ret += String::ToString(" Constant name: %s", pd.name);
|
||||
ret += String::ToString(" Constant name: %s", pd.name.c_str());
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -1384,7 +1384,8 @@ void GFXD3D11Shader::_buildSamplerShaderConstantHandles( Vector<GFXShaderConstDe
|
|||
const GFXShaderConstDesc &desc = *iter;
|
||||
|
||||
AssertFatal( desc.constType == GFXSCT_Sampler ||
|
||||
desc.constType == GFXSCT_SamplerCube,
|
||||
desc.constType == GFXSCT_SamplerCube ||
|
||||
desc.constType == GFXSCT_SamplerCubeArray,
|
||||
"GFXD3D11Shader::_buildSamplerShaderConstantHandles - Invalid samplerDescription type!" );
|
||||
|
||||
GFXD3D11ShaderConstHandle *handle;
|
||||
|
|
|
|||
|
|
@ -59,15 +59,18 @@ GFXD3D11StateBlock::GFXD3D11StateBlock(const GFXStateBlockDesc& desc)
|
|||
|
||||
ZeroMemory(&mBlendDesc, sizeof(D3D11_BLEND_DESC));
|
||||
mBlendDesc.AlphaToCoverageEnable = false;
|
||||
mBlendDesc.IndependentBlendEnable = mDesc.separateAlphaBlendEnable;
|
||||
mBlendDesc.IndependentBlendEnable = false;
|
||||
|
||||
mBlendDesc.RenderTarget[0].BlendEnable = mDesc.blendEnable;
|
||||
//color
|
||||
mBlendDesc.RenderTarget[0].BlendOp = GFXD3D11BlendOp[mDesc.blendOp];
|
||||
mBlendDesc.RenderTarget[0].BlendOpAlpha = GFXD3D11BlendOp[mDesc.separateAlphaBlendOp];
|
||||
mBlendDesc.RenderTarget[0].DestBlend = GFXD3D11Blend[mDesc.blendDest];
|
||||
mBlendDesc.RenderTarget[0].DestBlendAlpha = GFXD3D11Blend[mDesc.separateAlphaBlendDest];
|
||||
mBlendDesc.RenderTarget[0].SrcBlend = GFXD3D11Blend[mDesc.blendSrc];
|
||||
mBlendDesc.RenderTarget[0].SrcBlendAlpha = GFXD3D11Blend[mDesc.separateAlphaBlendSrc];
|
||||
//alpha
|
||||
mBlendDesc.RenderTarget[0].BlendOpAlpha = GFXD3D11BlendOp[mDesc.separateAlphaBlendEnable ? mDesc.separateAlphaBlendOp : mDesc.blendOp];
|
||||
mBlendDesc.RenderTarget[0].SrcBlendAlpha = GFXD3D11Blend[mDesc.separateAlphaBlendEnable ? mDesc.separateAlphaBlendSrc : mDesc.blendSrc];
|
||||
mBlendDesc.RenderTarget[0].DestBlendAlpha = GFXD3D11Blend[mDesc.separateAlphaBlendEnable ? mDesc.separateAlphaBlendDest : mDesc.blendDest];
|
||||
//target write mask
|
||||
mBlendDesc.RenderTarget[0].RenderTargetWriteMask = mColorMask;
|
||||
|
||||
HRESULT hr = D3D11DEVICE->CreateBlendState(&mBlendDesc, &mBlendState);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "gfx/gfxStringEnumTranslate.h"
|
||||
#include "windowManager/win32/win32Window.h"
|
||||
|
||||
GFXD3D11TextureTarget::GFXD3D11TextureTarget()
|
||||
GFXD3D11TextureTarget::GFXD3D11TextureTarget(bool genMips)
|
||||
: mTargetSize( Point2I::Zero ),
|
||||
mTargetFormat( GFXFormatR8G8B8A8 )
|
||||
{
|
||||
|
|
@ -39,6 +39,8 @@ GFXD3D11TextureTarget::GFXD3D11TextureTarget()
|
|||
mTargetViews[i] = NULL;
|
||||
mTargetSRViews[i] = NULL;
|
||||
}
|
||||
|
||||
mGenMips = genMips;
|
||||
}
|
||||
|
||||
GFXD3D11TextureTarget::~GFXD3D11TextureTarget()
|
||||
|
|
@ -215,7 +217,7 @@ void GFXD3D11TextureTarget::attachTexture( RenderSlot slot, GFXCubemap *tex, U32
|
|||
|
||||
mTargets[slot] = cube->get2DTex();
|
||||
mTargets[slot]->AddRef();
|
||||
mTargetViews[slot] = cube->getRTView(face);
|
||||
mTargetViews[slot] = cube->getRTView(face, mipLevel);
|
||||
mTargetViews[slot]->AddRef();
|
||||
mTargetSRViews[slot] = cube->getSRView();
|
||||
mTargetSRViews[slot]->AddRef();
|
||||
|
|
@ -262,6 +264,9 @@ void GFXD3D11TextureTarget::activate()
|
|||
|
||||
void GFXD3D11TextureTarget::deactivate()
|
||||
{
|
||||
if (!mGenMips)
|
||||
return;
|
||||
|
||||
//re-gen mip maps
|
||||
for (U32 i = 0; i < 6; i++)
|
||||
{
|
||||
|
|
@ -347,7 +352,23 @@ GFXFormat GFXD3D11WindowTarget::getFormat()
|
|||
|
||||
bool GFXD3D11WindowTarget::present()
|
||||
{
|
||||
return (D3D11->getSwapChain()->Present(!D3D11->smDisableVSync, 0) == S_OK);
|
||||
HRESULT hr = D3D11->getSwapChain()->Present(!D3D11->smDisableVSync, 0);
|
||||
if (hr == DXGI_ERROR_DEVICE_REMOVED)
|
||||
{
|
||||
HRESULT result = D3D11->getDevice()->GetDeviceRemovedReason();
|
||||
if (result == DXGI_ERROR_DEVICE_HUNG)
|
||||
AssertFatal(false,"DXGI_ERROR_DEVICE_HUNG");
|
||||
else if (result == DXGI_ERROR_DEVICE_REMOVED)
|
||||
AssertFatal(false, "DXGI_ERROR_DEVICE_REMOVED");
|
||||
else if (result == DXGI_ERROR_DEVICE_RESET)
|
||||
AssertFatal(false, "DXGI_ERROR_DEVICE_RESET");
|
||||
else if (result == DXGI_ERROR_DRIVER_INTERNAL_ERROR)
|
||||
AssertFatal(false, "DXGI_ERROR_DRIVER_INTERNAL_ERROR");
|
||||
else if (result == DXGI_ERROR_INVALID_CALL)
|
||||
AssertFatal(false, "DXGI_ERROR_INVALID_CALL");
|
||||
}
|
||||
|
||||
return (hr == S_OK);
|
||||
}
|
||||
|
||||
void GFXD3D11WindowTarget::setImplicitSwapChain()
|
||||
|
|
@ -370,7 +391,6 @@ void GFXD3D11WindowTarget::resetMode()
|
|||
mSize = Point2I(mPresentationParams.BufferDesc.Width, mPresentationParams.BufferDesc.Height);
|
||||
|
||||
mWindow->setSuppressReset(false);
|
||||
GFX->beginReset();
|
||||
}
|
||||
|
||||
void GFXD3D11WindowTarget::zombify()
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class GFXD3D11TextureTarget : public GFXTextureTarget
|
|||
|
||||
public:
|
||||
|
||||
GFXD3D11TextureTarget();
|
||||
GFXD3D11TextureTarget(bool genMips);
|
||||
~GFXD3D11TextureTarget();
|
||||
|
||||
// Public interface.
|
||||
|
|
|
|||
|
|
@ -177,25 +177,31 @@ bool GFXD3D11TextureObject::copyToBmp(GBitmap* bmp)
|
|||
// check format limitations
|
||||
// at the moment we only support RGBA for the source (other 4 byte formats should
|
||||
// be easy to add though)
|
||||
AssertFatal(mFormat == GFXFormatR8G8B8A8 || mFormat == GFXFormatR8G8B8A8_LINEAR_FORCE || mFormat == GFXFormatR8G8B8A8_SRGB, "copyToBmp: invalid format");
|
||||
if (mFormat != GFXFormatR8G8B8A8 && mFormat != GFXFormatR8G8B8A8_LINEAR_FORCE && mFormat != GFXFormatR8G8B8A8_SRGB)
|
||||
AssertFatal(mFormat == GFXFormatR16G16B16A16F || mFormat == GFXFormatR8G8B8A8 || mFormat == GFXFormatR8G8B8A8_LINEAR_FORCE || mFormat == GFXFormatR8G8B8A8_SRGB, "copyToBmp: invalid format");
|
||||
if (mFormat != GFXFormatR16G16B16A16F && mFormat != GFXFormatR8G8B8A8 && mFormat != GFXFormatR8G8B8A8_LINEAR_FORCE && mFormat != GFXFormatR8G8B8A8_SRGB)
|
||||
return false;
|
||||
|
||||
PROFILE_START(GFXD3D11TextureObject_copyToBmp);
|
||||
|
||||
AssertFatal(bmp->getWidth() == getWidth(), "GFXD3D11TextureObject::copyToBmp - source/dest width does not match");
|
||||
AssertFatal(bmp->getHeight() == getHeight(), "GFXD3D11TextureObject::copyToBmp - source/dest height does not match");
|
||||
const U32 width = getWidth();
|
||||
const U32 height = getHeight();
|
||||
const U32 mipLevels = getMipLevels();
|
||||
|
||||
bmp->setHasTransparency(mHasTransparency);
|
||||
|
||||
// set some constants
|
||||
const U32 sourceBytesPerPixel = 4;
|
||||
U32 sourceBytesPerPixel = 4;
|
||||
U32 destBytesPerPixel = 0;
|
||||
|
||||
const GFXFormat fmt = bmp->getFormat();
|
||||
if (fmt == GFXFormatR8G8B8A8 || fmt == GFXFormatR8G8B8A8_LINEAR_FORCE || fmt == GFXFormatR8G8B8A8_SRGB)
|
||||
bool fp16 = false;//is rgba16f format?
|
||||
if (fmt == GFXFormatR16G16B16A16F)
|
||||
{
|
||||
destBytesPerPixel = 8;
|
||||
sourceBytesPerPixel = 8;
|
||||
fp16 = true;
|
||||
}
|
||||
else if (fmt == GFXFormatR8G8B8A8 || fmt == GFXFormatR8G8B8A8_LINEAR_FORCE || fmt == GFXFormatR8G8B8A8_SRGB)
|
||||
destBytesPerPixel = 4;
|
||||
else if(bmp->getFormat() == GFXFormatR8G8B8)
|
||||
destBytesPerPixel = 3;
|
||||
|
|
@ -221,52 +227,66 @@ bool GFXD3D11TextureObject::copyToBmp(GBitmap* bmp)
|
|||
//copy the classes texture to the staging texture
|
||||
D3D11DEVICECONTEXT->CopyResource(pStagingTexture, mD3DTexture);
|
||||
|
||||
//map the staging resource
|
||||
D3D11_MAPPED_SUBRESOURCE mappedRes;
|
||||
hr = D3D11DEVICECONTEXT->Map(pStagingTexture, 0, D3D11_MAP_READ, 0, &mappedRes);
|
||||
if (FAILED(hr))
|
||||
for (U32 mip = 0; mip < mipLevels; mip++)
|
||||
{
|
||||
//cleanup
|
||||
SAFE_RELEASE(pStagingTexture);
|
||||
Con::errorf("GFXD3D11TextureObject::copyToBmp - Failed to map staging texture");
|
||||
return false;
|
||||
}
|
||||
|
||||
// set pointers
|
||||
const U8* srcPtr = (U8*)mappedRes.pData;
|
||||
U8* destPtr = bmp->getWritableBits();
|
||||
|
||||
// we will want to skip over any D3D cache data in the source texture
|
||||
const S32 sourceCacheSize = mappedRes.RowPitch - width * sourceBytesPerPixel;
|
||||
AssertFatal(sourceCacheSize >= 0, "GFXD3D11TextureObject::copyToBmp - cache size is less than zero?");
|
||||
|
||||
// copy data into bitmap
|
||||
for (U32 row = 0; row < height; ++row)
|
||||
{
|
||||
for (U32 col = 0; col < width; ++col)
|
||||
const U32 width = bmp->getWidth(mip);
|
||||
const U32 height = bmp->getHeight(mip);
|
||||
//map the staging resource
|
||||
D3D11_MAPPED_SUBRESOURCE mappedRes;
|
||||
const U32 subResource = D3D11CalcSubresource(mip, 0, mipLevels);
|
||||
hr = D3D11DEVICECONTEXT->Map(pStagingTexture, subResource, D3D11_MAP_READ, 0, &mappedRes);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
destPtr[0] = srcPtr[2]; // red
|
||||
destPtr[1] = srcPtr[1]; // green
|
||||
destPtr[2] = srcPtr[0]; // blue
|
||||
if (destBytesPerPixel == 4)
|
||||
destPtr[3] = srcPtr[3]; // alpha
|
||||
|
||||
// go to next pixel in src
|
||||
srcPtr += sourceBytesPerPixel;
|
||||
|
||||
// go to next pixel in dest
|
||||
destPtr += destBytesPerPixel;
|
||||
//cleanup
|
||||
SAFE_RELEASE(pStagingTexture);
|
||||
Con::errorf("GFXD3D11TextureObject::copyToBmp - Failed to map staging texture");
|
||||
return false;
|
||||
}
|
||||
// skip past the cache data for this row (if any)
|
||||
srcPtr += sourceCacheSize;
|
||||
|
||||
// set pointers
|
||||
const U8* srcPtr = (U8*)mappedRes.pData;
|
||||
U8* destPtr = bmp->getWritableBits(mip);
|
||||
|
||||
// we will want to skip over any D3D cache data in the source texture
|
||||
const S32 sourceCacheSize = mappedRes.RowPitch - width * sourceBytesPerPixel;
|
||||
AssertFatal(sourceCacheSize >= 0, "GFXD3D11TextureObject::copyToBmp - cache size is less than zero?");
|
||||
|
||||
// copy data into bitmap
|
||||
for (U32 row = 0; row < height; ++row)
|
||||
{
|
||||
for (U32 col = 0; col < width; ++col)
|
||||
{
|
||||
//we can just copy data straight in with RGBA16F format
|
||||
if (fp16)
|
||||
{
|
||||
dMemcpy(destPtr, srcPtr, sizeof(U16) * 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
destPtr[0] = srcPtr[2]; // red
|
||||
destPtr[1] = srcPtr[1]; // green
|
||||
destPtr[2] = srcPtr[0]; // blue
|
||||
if (destBytesPerPixel == 4)
|
||||
destPtr[3] = srcPtr[3]; // alpha
|
||||
}
|
||||
|
||||
// go to next pixel in src
|
||||
srcPtr += sourceBytesPerPixel;
|
||||
|
||||
// go to next pixel in dest
|
||||
destPtr += destBytesPerPixel;
|
||||
}
|
||||
// skip past the cache data for this row (if any)
|
||||
srcPtr += sourceCacheSize;
|
||||
}
|
||||
|
||||
// assert if we stomped or underran memory
|
||||
AssertFatal(U32(destPtr - bmp->getWritableBits(mip)) == width * height * destBytesPerPixel, "GFXD3D11TextureObject::copyToBmp - memory error");
|
||||
AssertFatal(U32(srcPtr - (U8*)mappedRes.pData) == height * mappedRes.RowPitch, "GFXD3D11TextureObject::copyToBmp - memory error");
|
||||
|
||||
D3D11DEVICECONTEXT->Unmap(pStagingTexture, subResource);
|
||||
}
|
||||
|
||||
// assert if we stomped or underran memory
|
||||
AssertFatal(U32(destPtr - bmp->getWritableBits()) == width * height * destBytesPerPixel, "GFXD3D11TextureObject::copyToBmp - memory error");
|
||||
AssertFatal(U32(srcPtr - (U8*)mappedRes.pData) == height * mappedRes.RowPitch, "GFXD3D11TextureObject::copyToBmp - memory error");
|
||||
|
||||
D3D11DEVICECONTEXT->Unmap(pStagingTexture, 0);
|
||||
|
||||
SAFE_RELEASE(pStagingTexture);
|
||||
PROFILE_END();
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ private:
|
|||
public:
|
||||
virtual void initStatic( GFXTexHandle *faces ) { };
|
||||
virtual void initStatic( DDSFile *dds ) { };
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8 ) { };
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0) { };
|
||||
virtual U32 getSize() const { return 0; }
|
||||
virtual GFXFormat getFormat() const { return GFXFormatR8G8B8A8; }
|
||||
|
||||
|
|
@ -161,6 +161,23 @@ public:
|
|||
virtual void resurrect() {}
|
||||
};
|
||||
|
||||
class GFXNullCubemapArray : public GFXCubemapArray
|
||||
{
|
||||
friend class GFXDevice;
|
||||
private:
|
||||
// should only be called by GFXDevice
|
||||
virtual void setToTexUnit(U32 tuNum) { };
|
||||
|
||||
public:
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount) { };
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format) { };
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot) { };
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap) { }
|
||||
virtual ~GFXNullCubemapArray() {};
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
};
|
||||
|
||||
class GFXNullVertexBuffer : public GFXVertexBuffer
|
||||
{
|
||||
unsigned char* tempBuf;
|
||||
|
|
@ -295,6 +312,11 @@ GFXCubemap* GFXNullDevice::createCubemap()
|
|||
return new GFXNullCubemap();
|
||||
};
|
||||
|
||||
GFXCubemapArray* GFXNullDevice::createCubemapArray()
|
||||
{
|
||||
return new GFXNullCubemapArray();
|
||||
};
|
||||
|
||||
void GFXNullDevice::enumerateAdapters( Vector<GFXAdapter*> &adapterList )
|
||||
{
|
||||
// Add the NULL renderer
|
||||
|
|
|
|||
|
|
@ -129,12 +129,13 @@ protected:
|
|||
|
||||
public:
|
||||
virtual GFXCubemap * createCubemap();
|
||||
virtual GFXCubemapArray *createCubemapArray();
|
||||
|
||||
virtual F32 getFillConventionOffset() const { return 0.0f; };
|
||||
|
||||
///@}
|
||||
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(){return NULL;};
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips=true){return NULL;};
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window)
|
||||
{
|
||||
return new GFXNullWindowTarget();
|
||||
|
|
@ -149,8 +150,9 @@ public:
|
|||
|
||||
virtual GFXShader* createShader() { return NULL; };
|
||||
|
||||
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) { };
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil ) { };
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color) { };
|
||||
virtual bool beginSceneInternal() { return true; };
|
||||
virtual void endSceneInternal() { };
|
||||
|
||||
|
|
|
|||
|
|
@ -174,9 +174,57 @@ void bitmapExtrudeRGBA_c(const void *srcMip, void *mip, U32 srcHeight, U32 srcWi
|
|||
}
|
||||
}
|
||||
|
||||
void bitmapExtrudeFPRGBA_c(const void *srcMip, void *mip, U32 srcHeight, U32 srcWidth)
|
||||
{
|
||||
const U16 *src = (const U16 *)srcMip;
|
||||
U16 *dst = (U16 *)mip;
|
||||
U32 stride = srcHeight != 1 ? (srcWidth) * 8 : 0;
|
||||
|
||||
U32 width = srcWidth >> 1;
|
||||
U32 height = srcHeight >> 1;
|
||||
if (width == 0) width = 1;
|
||||
if (height == 0) height = 1;
|
||||
|
||||
if (srcWidth != 1)
|
||||
{
|
||||
for (U32 y = 0; y < height; y++)
|
||||
{
|
||||
for (U32 x = 0; x < width; x++)
|
||||
{
|
||||
*dst++ = (U32(*src) + U32(src[4]) + U32(src[stride]) + U32(src[stride + 4]) + 2) >> 2;
|
||||
src++;
|
||||
*dst++ = (U32(*src) + U32(src[4]) + U32(src[stride]) + U32(src[stride + 4]) + 2) >> 2;
|
||||
src++;
|
||||
*dst++ = (U32(*src) + U32(src[4]) + U32(src[stride]) + U32(src[stride + 4]) + 2) >> 2;
|
||||
src++;
|
||||
*dst++ = (U32(*src) + U32(src[4]) + U32(src[stride]) + U32(src[stride + 4]) + 2) >> 2;
|
||||
src += 5;
|
||||
}
|
||||
src += stride; // skip
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (U32 y = 0; y < height; y++)
|
||||
{
|
||||
*dst++ = (U32(*src) + U32(src[stride]) + 1) >> 1;
|
||||
src++;
|
||||
*dst++ = (U32(*src) + U32(src[stride]) + 1) >> 1;
|
||||
src++;
|
||||
*dst++ = (U32(*src) + U32(src[stride]) + 1) >> 1;
|
||||
src++;
|
||||
*dst++ = (U32(*src) + U32(src[stride]) + 1) >> 1;
|
||||
src += 5;
|
||||
|
||||
src += stride; // skip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void (*bitmapExtrude5551)(const void *srcMip, void *mip, U32 height, U32 width) = bitmapExtrude5551_c;
|
||||
void (*bitmapExtrudeRGB)(const void *srcMip, void *mip, U32 srcHeight, U32 srcWidth) = bitmapExtrudeRGB_c;
|
||||
void (*bitmapExtrudeRGBA)(const void *srcMip, void *mip, U32 srcHeight, U32 srcWidth) = bitmapExtrudeRGBA_c;
|
||||
void (*bitmapExtrudeFPRGBA)(const void *srcMip, void *mip, U32 srcHeight, U32 srcWidth) = bitmapExtrudeFPRGBA_c;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
extern void (*bitmapExtrude5551)(const void *srcMip, void *mip, U32 height, U32 width);
|
||||
extern void (*bitmapExtrudeRGB)(const void *srcMip, void *mip, U32 height, U32 width);
|
||||
extern void (*bitmapExtrudeRGBA)(const void *srcMip, void *mip, U32 height, U32 width);
|
||||
extern void(*bitmapExtrudeFPRGBA)(const void *srcMip, void *mip, U32 height, U32 width);
|
||||
extern void (*bitmapConvertRGB_to_5551)(U8 *src, U32 pixels);
|
||||
extern void (*bitmapConvertRGB_to_1555)(U8 *src, U32 pixels);
|
||||
extern void (*bitmapConvertRGB_to_RGBX)( U8 **src, U32 pixels );
|
||||
|
|
|
|||
123
Engine/source/gfx/bitmap/cubemapSaver.cpp
Normal file
123
Engine/source/gfx/bitmap/cubemapSaver.cpp
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
#include "platform/platform.h"
|
||||
#include "gfx/bitmap/ddsFile.h"
|
||||
#include "gfx/bitmap/imageUtils.h"
|
||||
#include "gfx/gfxDevice.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
#include "materials/shaderData.h"
|
||||
#include "core/stream/fileStream.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "math/mTransform.h"
|
||||
|
||||
namespace CubemapSaver
|
||||
{
|
||||
const U32 CubeFaces = 6;
|
||||
|
||||
bool save(GFXCubemapHandle cubemap, const Torque::Path &path, GFXFormat compressionFormat)
|
||||
{
|
||||
if (!cubemap.isValid())
|
||||
{
|
||||
Con::errorf("CubemapSaver: cubemap handle is not valid");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
GFXCubemap *pCubemap = cubemap.getPointer();
|
||||
const U32 faceSize = pCubemap->getSize();
|
||||
const U32 mipLevels = pCubemap->getMipMapLevels();
|
||||
|
||||
GFXFormat targetFmt = pCubemap->getFormat();
|
||||
//setup render targets
|
||||
GFXTexHandle pTextures[CubeFaces];
|
||||
|
||||
for (U32 face = 0; face < CubeFaces; face++)
|
||||
{
|
||||
pTextures[face].set(faceSize, faceSize, targetFmt,
|
||||
&GFXStaticTextureProfile, avar("%s() - (line %d)", __FUNCTION__, __LINE__),
|
||||
mipLevels, GFXTextureManager::AA_MATCH_BACKBUFFER);
|
||||
|
||||
// yep t3d has funky z up, need to change the face order
|
||||
GFX->copyResource(pTextures[face], pCubemap, GFXCubemap::zUpFaceIndex(face) );
|
||||
}
|
||||
|
||||
GBitmap *pBitmaps[CubeFaces];
|
||||
bool error = false;
|
||||
const bool compressedFormat = ImageUtil::isCompressedFormat(compressionFormat);
|
||||
const bool hasMips = mipLevels > 1 ? true : false;
|
||||
for (U32 i = 0; i < CubeFaces; i++)
|
||||
{
|
||||
pBitmaps[i] = new GBitmap(faceSize, faceSize, hasMips, targetFmt);
|
||||
bool result = pTextures[i].copyToBmp(pBitmaps[i]);
|
||||
if (!result)
|
||||
{
|
||||
Con::errorf("CubemapSaver: cubemap number %u failed to copy", i);
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!error)
|
||||
{
|
||||
DDSFile *pDds = DDSFile::createDDSCubemapFileFromGBitmaps(pBitmaps);
|
||||
if (pDds)
|
||||
{
|
||||
// compressed and floating point don't need swizzling
|
||||
if (!compressedFormat && targetFmt != GFXFormatR16G16B16A16F)
|
||||
ImageUtil::swizzleDDS(pDds, Swizzles::bgra);
|
||||
|
||||
if(compressedFormat)
|
||||
ImageUtil::ddsCompress(pDds, compressionFormat);
|
||||
|
||||
FileStream stream;
|
||||
stream.open(path, Torque::FS::File::Write);
|
||||
|
||||
if (stream.getStatus() == Stream::Ok)
|
||||
pDds->write(stream);
|
||||
else
|
||||
Con::errorf("CubemapSaver: failed to open file stream for file %s", path.getFullPath().c_str());
|
||||
|
||||
SAFE_DELETE(pDds);
|
||||
}
|
||||
}
|
||||
|
||||
//cleanup
|
||||
for (U32 i = 0; i < CubeFaces; i++)
|
||||
SAFE_DELETE(pBitmaps[i]);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool getBitmaps(GFXCubemapHandle cubemap, GFXFormat compressionFormat, GBitmap* faceBitmaps[6])
|
||||
{
|
||||
if (!cubemap.isValid())
|
||||
{
|
||||
Con::errorf("CubemapSaver: cubemap handle is not valid");
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
41
Engine/source/gfx/bitmap/cubemapSaver.h
Normal file
41
Engine/source/gfx/bitmap/cubemapSaver.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2016 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _CUBEMAP_SAVER_H_
|
||||
#define _CUBEMAP_SAVER_H_
|
||||
|
||||
#ifndef _GFXCUBEMAP_H_
|
||||
#include "gfx/gfxCubemap.h"
|
||||
#endif
|
||||
#ifndef __RESOURCE_H__
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
namespace CubemapSaver
|
||||
{
|
||||
// save cubemap handle to a dds cubemap with optional compression
|
||||
bool save(GFXCubemapHandle cubemap, const Torque::Path &path, GFXFormat compressionFormat = GFXFormatR8G8B8A8);
|
||||
|
||||
bool getBitmaps(GFXCubemapHandle cubemap, GFXFormat compressionFormat, GBitmap* faceBitmaps[6]);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -619,6 +619,7 @@ namespace dds
|
|||
//float
|
||||
case D3DFMT_R16F: return GFXFormatR16F;
|
||||
case D3DFMT_R32F: return GFXFormatR32F;
|
||||
case D3DFMT_G16R16F: return GFXFormatR16G16F;
|
||||
case D3DFMT_A16B16G16R16F: return GFXFormatR16G16B16A16F;
|
||||
case D3DFMT_A32B32G32R32F: return GFXFormatR32G32B32A32F;
|
||||
//compressed
|
||||
|
|
@ -655,6 +656,7 @@ namespace dds
|
|||
//float
|
||||
case DXGI_FORMAT_R16_FLOAT: return GFXFormatR16F;
|
||||
case DXGI_FORMAT_R32_FLOAT: return GFXFormatR32F;
|
||||
case DXGI_FORMAT_R16G16_FLOAT: return GFXFormatR16G16F;
|
||||
case DXGI_FORMAT_R16G16B16A16_FLOAT: return GFXFormatR16G16B16A16F;
|
||||
case DXGI_FORMAT_R32G32B32A32_FLOAT: return GFXFormatR32G32B32A32F;
|
||||
//compressed
|
||||
|
|
@ -731,6 +733,7 @@ namespace dds
|
|||
case D3DFMT_ATI2: return GFXFormatBC5;
|
||||
case D3DFMT_A16B16G16R16F: return GFXFormatR16G16B16A16F;
|
||||
case D3DFMT_A32B32G32R32F: return GFXFormatR32G32B32A32F;
|
||||
case D3DFMT_G16R16F: return GFXFormatR16G16F;
|
||||
default:
|
||||
{
|
||||
Con::errorf("dds::getGFXFormatFourcc: unknown format");
|
||||
|
|
@ -739,6 +742,132 @@ namespace dds
|
|||
}
|
||||
}
|
||||
|
||||
const U32 getBitsPerPixel(DXGI_FORMAT fmt)
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
case DXGI_FORMAT_R32G32B32A32_TYPELESS:
|
||||
case DXGI_FORMAT_R32G32B32A32_FLOAT:
|
||||
case DXGI_FORMAT_R32G32B32A32_UINT:
|
||||
case DXGI_FORMAT_R32G32B32A32_SINT:
|
||||
return 128;
|
||||
|
||||
case DXGI_FORMAT_R32G32B32_TYPELESS:
|
||||
case DXGI_FORMAT_R32G32B32_FLOAT:
|
||||
case DXGI_FORMAT_R32G32B32_UINT:
|
||||
case DXGI_FORMAT_R32G32B32_SINT:
|
||||
return 96;
|
||||
|
||||
case DXGI_FORMAT_R16G16B16A16_TYPELESS:
|
||||
case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
||||
case DXGI_FORMAT_R16G16B16A16_UNORM:
|
||||
case DXGI_FORMAT_R16G16B16A16_UINT:
|
||||
case DXGI_FORMAT_R16G16B16A16_SNORM:
|
||||
case DXGI_FORMAT_R16G16B16A16_SINT:
|
||||
case DXGI_FORMAT_R32G32_TYPELESS:
|
||||
case DXGI_FORMAT_R32G32_FLOAT:
|
||||
case DXGI_FORMAT_R32G32_UINT:
|
||||
case DXGI_FORMAT_R32G32_SINT:
|
||||
case DXGI_FORMAT_R32G8X24_TYPELESS:
|
||||
case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:
|
||||
case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
|
||||
case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:
|
||||
return 64;
|
||||
|
||||
case DXGI_FORMAT_R10G10B10A2_TYPELESS:
|
||||
case DXGI_FORMAT_R10G10B10A2_UNORM:
|
||||
case DXGI_FORMAT_R10G10B10A2_UINT:
|
||||
case DXGI_FORMAT_R11G11B10_FLOAT:
|
||||
case DXGI_FORMAT_R8G8B8A8_TYPELESS:
|
||||
case DXGI_FORMAT_R8G8B8A8_UNORM:
|
||||
case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
|
||||
case DXGI_FORMAT_R8G8B8A8_UINT:
|
||||
case DXGI_FORMAT_R8G8B8A8_SNORM:
|
||||
case DXGI_FORMAT_R8G8B8A8_SINT:
|
||||
case DXGI_FORMAT_R16G16_TYPELESS:
|
||||
case DXGI_FORMAT_R16G16_FLOAT:
|
||||
case DXGI_FORMAT_R16G16_UNORM:
|
||||
case DXGI_FORMAT_R16G16_UINT:
|
||||
case DXGI_FORMAT_R16G16_SNORM:
|
||||
case DXGI_FORMAT_R16G16_SINT:
|
||||
case DXGI_FORMAT_R32_TYPELESS:
|
||||
case DXGI_FORMAT_D32_FLOAT:
|
||||
case DXGI_FORMAT_R32_FLOAT:
|
||||
case DXGI_FORMAT_R32_UINT:
|
||||
case DXGI_FORMAT_R32_SINT:
|
||||
case DXGI_FORMAT_R24G8_TYPELESS:
|
||||
case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:
|
||||
case DXGI_FORMAT_X24_TYPELESS_G8_UINT:
|
||||
case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:
|
||||
case DXGI_FORMAT_R8G8_B8G8_UNORM:
|
||||
case DXGI_FORMAT_G8R8_G8B8_UNORM:
|
||||
case DXGI_FORMAT_B8G8R8A8_UNORM:
|
||||
case DXGI_FORMAT_B8G8R8X8_UNORM:
|
||||
case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:
|
||||
case DXGI_FORMAT_B8G8R8A8_TYPELESS:
|
||||
case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:
|
||||
case DXGI_FORMAT_B8G8R8X8_TYPELESS:
|
||||
case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:
|
||||
return 32;
|
||||
|
||||
case DXGI_FORMAT_R8G8_TYPELESS:
|
||||
case DXGI_FORMAT_R8G8_UNORM:
|
||||
case DXGI_FORMAT_R8G8_UINT:
|
||||
case DXGI_FORMAT_R8G8_SNORM:
|
||||
case DXGI_FORMAT_R8G8_SINT:
|
||||
case DXGI_FORMAT_R16_TYPELESS:
|
||||
case DXGI_FORMAT_R16_FLOAT:
|
||||
case DXGI_FORMAT_D16_UNORM:
|
||||
case DXGI_FORMAT_R16_UNORM:
|
||||
case DXGI_FORMAT_R16_UINT:
|
||||
case DXGI_FORMAT_R16_SNORM:
|
||||
case DXGI_FORMAT_R16_SINT:
|
||||
case DXGI_FORMAT_B5G6R5_UNORM:
|
||||
case DXGI_FORMAT_B5G5R5A1_UNORM:
|
||||
return 16;
|
||||
|
||||
case DXGI_FORMAT_R8_TYPELESS:
|
||||
case DXGI_FORMAT_R8_UNORM:
|
||||
case DXGI_FORMAT_R8_UINT:
|
||||
case DXGI_FORMAT_R8_SNORM:
|
||||
case DXGI_FORMAT_R8_SINT:
|
||||
case DXGI_FORMAT_A8_UNORM:
|
||||
return 8;
|
||||
|
||||
case DXGI_FORMAT_R1_UNORM:
|
||||
return 1;
|
||||
|
||||
case DXGI_FORMAT_BC1_TYPELESS:
|
||||
case DXGI_FORMAT_BC1_UNORM:
|
||||
case DXGI_FORMAT_BC1_UNORM_SRGB:
|
||||
case DXGI_FORMAT_BC4_TYPELESS:
|
||||
case DXGI_FORMAT_BC4_UNORM:
|
||||
case DXGI_FORMAT_BC4_SNORM:
|
||||
return 4;
|
||||
|
||||
case DXGI_FORMAT_BC2_TYPELESS:
|
||||
case DXGI_FORMAT_BC2_UNORM:
|
||||
case DXGI_FORMAT_BC2_UNORM_SRGB:
|
||||
case DXGI_FORMAT_BC3_TYPELESS:
|
||||
case DXGI_FORMAT_BC3_UNORM:
|
||||
case DXGI_FORMAT_BC3_UNORM_SRGB:
|
||||
case DXGI_FORMAT_BC5_TYPELESS:
|
||||
case DXGI_FORMAT_BC5_UNORM:
|
||||
case DXGI_FORMAT_BC5_SNORM:
|
||||
case DXGI_FORMAT_BC6H_TYPELESS:
|
||||
case DXGI_FORMAT_BC6H_UF16:
|
||||
case DXGI_FORMAT_BC6H_SF16:
|
||||
case DXGI_FORMAT_BC7_TYPELESS:
|
||||
case DXGI_FORMAT_BC7_UNORM:
|
||||
case DXGI_FORMAT_BC7_UNORM_SRGB:
|
||||
return 8;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const bool validateHeader(const DDS_HEADER &header)
|
||||
{
|
||||
if (header.size != DDS_HEADER_SIZE)
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ bool DDSFile::readHeader(Stream &s)
|
|||
mFlags.set(CompressedData);
|
||||
else
|
||||
{
|
||||
mBytesPerPixel = header.ddspf.bpp / 8;
|
||||
mBytesPerPixel = dds::getBitsPerPixel(dx10header.dxgiFormat) / 8;
|
||||
mFlags.set(RGBData);
|
||||
}
|
||||
|
||||
|
|
@ -294,7 +294,34 @@ bool DDSFile::readHeader(Stream &s)
|
|||
mFlags.set(CompressedData);
|
||||
else
|
||||
{
|
||||
mBytesPerPixel = header.ddspf.bpp / 8;
|
||||
switch (header.ddspf.fourCC)
|
||||
{
|
||||
case 36: // D3DFMT_A16B16G16R16
|
||||
mBytesPerPixel = 8;
|
||||
break;
|
||||
case 110: // D3DFMT_Q16W16V16U16
|
||||
mBytesPerPixel = 8;
|
||||
break;
|
||||
case 111: // D3DFMT_R16F
|
||||
mBytesPerPixel = 2;
|
||||
break;
|
||||
case 112: // D3DFMT_G16R16F
|
||||
mBytesPerPixel = 4;
|
||||
break;
|
||||
case 113: // D3DFMT_A16B16G16R16F
|
||||
mBytesPerPixel = 8;
|
||||
break;
|
||||
case 114: // D3DFMT_R32F
|
||||
mBytesPerPixel = 4;
|
||||
break;
|
||||
case 115: // D3DFMT_G32R32F
|
||||
mBytesPerPixel = 8;
|
||||
break;
|
||||
case 116: // D3DFMT_A32B32G32R32F
|
||||
mBytesPerPixel = 16;
|
||||
break;
|
||||
}
|
||||
|
||||
mFlags.set(RGBData);
|
||||
}
|
||||
}
|
||||
|
|
@ -370,8 +397,8 @@ bool DDSFile::read(Stream &s, U32 dropMipCount)
|
|||
}
|
||||
|
||||
// Load all the mips.
|
||||
for(S32 l=0; l<mMipMapCount; l++)
|
||||
mSurfaces[i]->readNextMip(this, s, mHeight, mWidth, l, l < dropMipCount );
|
||||
for(S32 mip=0; mip<mMipMapCount; mip++)
|
||||
mSurfaces[i]->readNextMip(this, s, mHeight, mWidth, mip, mip < dropMipCount );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -456,6 +483,8 @@ bool DDSFile::writeHeader( Stream &s )
|
|||
{
|
||||
surfaceFlags |= DDS_SURFACE_FLAGS_CUBEMAP;
|
||||
cubemapFlags |= DDS_CUBEMAP_ALLFACES;
|
||||
if (hasDx10Header)
|
||||
dx10header.miscFlag = dds::D3D10_RESOURCE_MISC_TEXTURECUBE;
|
||||
}
|
||||
|
||||
//volume texture
|
||||
|
|
@ -712,9 +741,10 @@ DDSFile *DDSFile::createDDSCubemapFileFromGBitmaps(GBitmap **gbmps)
|
|||
//all cubemaps have the same dimensions and formats
|
||||
GBitmap *pBitmap = gbmps[0];
|
||||
|
||||
if (pBitmap->getFormat() != GFXFormatR8G8B8A8)
|
||||
GFXFormat fmt = pBitmap->getFormat();
|
||||
if (fmt != GFXFormatR8G8B8A8 && fmt != GFXFormatR16G16B16A16F)
|
||||
{
|
||||
Con::errorf("createDDSCubemapFileFromGBitmaps: Only GFXFormatR8G8B8A8 supported for now");
|
||||
Con::errorf("createDDSCubemapFileFromGBitmaps: unsupported format");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -297,12 +297,16 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
|
|||
case GFXFormatR8G8B8X8:
|
||||
case GFXFormatR8G8B8A8: mBytesPerPixel = 4;
|
||||
break;
|
||||
case GFXFormatL16:
|
||||
case GFXFormatR5G6B5:
|
||||
case GFXFormatR5G5B5A1: mBytesPerPixel = 2;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "GBitmap::GBitmap: misunderstood format specifier");
|
||||
break;
|
||||
case GFXFormatR16G16B16A16F:
|
||||
case GFXFormatR16G16B16A16: mBytesPerPixel = 8;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "GBitmap::GBitmap: misunderstood format specifier");
|
||||
break;
|
||||
}
|
||||
|
||||
// Set up the mip levels, if necessary...
|
||||
|
|
@ -371,9 +375,13 @@ void GBitmap::allocateBitmapWithMips(const U32 in_width, const U32 in_height, co
|
|||
case GFXFormatR8G8B8X8:
|
||||
case GFXFormatR8G8B8A8: mBytesPerPixel = 4;
|
||||
break;
|
||||
case GFXFormatL16:
|
||||
case GFXFormatR5G6B5:
|
||||
case GFXFormatR5G5B5A1: mBytesPerPixel = 2;
|
||||
break;
|
||||
case GFXFormatR16G16B16A16F:
|
||||
case GFXFormatR16G16B16A16: mBytesPerPixel = 8;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "GBitmap::GBitmap: misunderstood format specifier");
|
||||
break;
|
||||
|
|
@ -447,6 +455,13 @@ void GBitmap::extrudeMipLevels(bool clearBorders)
|
|||
bitmapExtrudeRGBA(getBits(i - 1), getWritableBits(i), getHeight(i-1), getWidth(i-1));
|
||||
break;
|
||||
}
|
||||
|
||||
case GFXFormatR16G16B16A16F:
|
||||
{
|
||||
for (U32 i = 1; i < mNumMipLevels; i++)
|
||||
bitmapExtrudeFPRGBA(getBits(i - 1), getWritableBits(i), getHeight(i - 1), getWidth(i - 1));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
@ -679,6 +694,7 @@ bool GBitmap::checkForTransparency()
|
|||
{
|
||||
// Non-transparent formats
|
||||
case GFXFormatL8:
|
||||
case GFXFormatL16:
|
||||
case GFXFormatR8G8B8:
|
||||
case GFXFormatR5G6B5:
|
||||
break;
|
||||
|
|
@ -754,7 +770,8 @@ bool GBitmap::getColor(const U32 x, const U32 y, ColorI& rColor) const
|
|||
case GFXFormatL8:
|
||||
rColor.set( *pLoc, *pLoc, *pLoc, *pLoc );
|
||||
break;
|
||||
|
||||
case GFXFormatL16:
|
||||
rColor.set(U8(U16((pLoc[0] << 8) + pLoc[2])), 0, 0, 0);
|
||||
case GFXFormatR8G8B8:
|
||||
case GFXFormatR8G8B8X8:
|
||||
rColor.set( pLoc[0], pLoc[1], pLoc[2], 255 );
|
||||
|
|
@ -803,6 +820,10 @@ bool GBitmap::setColor(const U32 x, const U32 y, const ColorI& rColor)
|
|||
*pLoc = rColor.alpha;
|
||||
break;
|
||||
|
||||
case GFXFormatL16:
|
||||
dMemcpy(pLoc, &rColor, 2 * sizeof(U8));
|
||||
break;
|
||||
|
||||
case GFXFormatR8G8B8:
|
||||
dMemcpy( pLoc, &rColor, 3 * sizeof( U8 ) );
|
||||
break;
|
||||
|
|
@ -1122,6 +1143,7 @@ bool GBitmap::read(Stream& io_rStream)
|
|||
break;
|
||||
case GFXFormatR8G8B8A8: mBytesPerPixel = 4;
|
||||
break;
|
||||
case GFXFormatL16:
|
||||
case GFXFormatR5G6B5:
|
||||
case GFXFormatR5G5B5A1: mBytesPerPixel = 2;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -301,4 +301,9 @@ namespace ImageUtil
|
|||
return format;
|
||||
};
|
||||
}
|
||||
|
||||
U32 getMaxMipCount(const U32 width, const U32 height)
|
||||
{
|
||||
return mFloor(mLog2(mMax(width, height))) + 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -29,6 +29,9 @@
|
|||
#ifndef _GFXENUMS_H_
|
||||
#include "gfx/gfxEnums.h"
|
||||
#endif
|
||||
#ifndef _MMATHFN_H_
|
||||
#include "math/mMathFn.h"
|
||||
#endif
|
||||
|
||||
struct DDSFile;
|
||||
|
||||
|
|
@ -57,6 +60,8 @@ namespace ImageUtil
|
|||
|
||||
//convert to sRGB format
|
||||
GFXFormat toSRGBFormat(const GFXFormat format);
|
||||
|
||||
U32 getMaxMipCount(const U32 width, const U32 height);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -240,7 +240,7 @@ static bool sReadPNG(Stream &stream, GBitmap *bitmap)
|
|||
png_set_expand(png_ptr);
|
||||
|
||||
if (bit_depth == 16)
|
||||
format = GFXFormatR5G6B5;
|
||||
format = GFXFormatL16;
|
||||
else
|
||||
format = GFXFormatA8;
|
||||
}
|
||||
|
|
@ -276,7 +276,7 @@ static bool sReadPNG(Stream &stream, GBitmap *bitmap)
|
|||
AssertFatal(rowBytes == width * 4,
|
||||
"Error, our rowbytes are incorrect for this transform... (4)");
|
||||
}
|
||||
else if (format == GFXFormatR5G6B5)
|
||||
else if (format == GFXFormatL16)
|
||||
{
|
||||
AssertFatal(rowBytes == width * 2,
|
||||
"Error, our rowbytes are incorrect for this transform... (2)");
|
||||
|
|
|
|||
|
|
@ -26,6 +26,13 @@
|
|||
#include "gfx/gfxTextureManager.h"
|
||||
|
||||
|
||||
GFXCubemap::GFXCubemap()
|
||||
{
|
||||
mPath = "";
|
||||
mMipMapLevels = 0;
|
||||
mInitialized = false;
|
||||
}
|
||||
|
||||
GFXCubemap::~GFXCubemap()
|
||||
{
|
||||
// If we're not dynamic and we were loaded from a
|
||||
|
|
@ -35,7 +42,7 @@ GFXCubemap::~GFXCubemap()
|
|||
TEXMGR->releaseCubemap( this );
|
||||
}
|
||||
|
||||
U32 GFXCubemap::_zUpFaceIndex(const U32 index)
|
||||
U32 GFXCubemap::zUpFaceIndex(const U32 index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
|
|
@ -124,3 +131,10 @@ bool GFXCubemapHandle::set( const String &cubemapDDS )
|
|||
|
||||
return isValid();
|
||||
}
|
||||
|
||||
const String GFXCubemapArray::describeSelf() const
|
||||
{
|
||||
// We've got nothing
|
||||
return String();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ protected:
|
|||
/// Sets the cubemap file path.
|
||||
void _setPath( const String &path ) { mPath = path; }
|
||||
|
||||
/// Get Z up face index of the cubemap. DDS files will be stored Y up
|
||||
U32 _zUpFaceIndex(const U32 index);
|
||||
|
||||
U32 mMipMapLevels;
|
||||
|
||||
bool mInitialized;
|
||||
public:
|
||||
|
||||
/// Create a static cubemap from a list of 6 face textures.
|
||||
|
|
@ -59,11 +59,12 @@ public:
|
|||
/// Create a static cubemap from a DDS cubemap file.
|
||||
virtual void initStatic( DDSFile *dds ) = 0;
|
||||
|
||||
///
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8 ) = 0;
|
||||
///create dynamic cubemap. mipLevels 0 is auto create mips, otherwise the value is how many mip levels you wish the cubemap to have
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0 ) = 0;
|
||||
|
||||
void initNormalize(U32 size);
|
||||
|
||||
GFXCubemap();
|
||||
virtual ~GFXCubemap();
|
||||
|
||||
/// Returns the size of the faces.
|
||||
|
|
@ -72,6 +73,9 @@ public:
|
|||
/// Returns the face texture format.
|
||||
virtual GFXFormat getFormat() const = 0;
|
||||
|
||||
/// Returns if this cubemap has been initialized
|
||||
virtual bool isInitialized() { return false; }
|
||||
|
||||
/// Returns the cubemap file path set at creation.
|
||||
const String& getPath() const { return mPath; }
|
||||
|
||||
|
|
@ -81,6 +85,9 @@ public:
|
|||
|
||||
/// Get the number of mip maps
|
||||
const U32 getMipMapLevels() const { return mMipMapLevels; }
|
||||
|
||||
/// Get Z up face index of the cubemap. DDS files will be stored Y up
|
||||
static U32 zUpFaceIndex(const U32 index);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -99,5 +106,58 @@ public:
|
|||
void free() { StrongObjectRef::set( NULL ); }
|
||||
};
|
||||
|
||||
/// Cubemap array - data lives on the GPU only with this class, but the data is not immutable so it can be updated
|
||||
class GFXCubemapArray : public StrongRefBase, public GFXResource
|
||||
{
|
||||
friend class GFXDevice;
|
||||
friend class GFXTextureManager;
|
||||
|
||||
protected:
|
||||
/// should only be called by GFXDevice
|
||||
virtual void setToTexUnit( U32 tuNum ) = 0;
|
||||
/// number of cubemaps in the array
|
||||
U32 mNumCubemaps;
|
||||
/// cubemap face size
|
||||
U32 mSize;
|
||||
/// number of mip levels
|
||||
U32 mMipMapLevels;
|
||||
/// format
|
||||
GFXFormat mFormat;
|
||||
|
||||
public:
|
||||
|
||||
virtual ~GFXCubemapArray() {};
|
||||
/// Initialize from an array of cubemaps
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount) = 0;
|
||||
/// Initialize cubemapCount number of blank cubemaps in the array
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format) = 0;
|
||||
/// Update cubemap in the array
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot) = 0;
|
||||
/// Copy this cubemap to another - destination must be same format, same face size & at-least the same size(or larger)
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap) = 0;
|
||||
/// Return number of textures in the array
|
||||
const U32 getNumCubemaps() const { return mNumCubemaps; }
|
||||
/// Get the number of mip maps
|
||||
const U32 getMipMapLevels() const { return mMipMapLevels; }
|
||||
/// Returns the size of the faces.
|
||||
const U32 getSize() const { return mSize; }
|
||||
/// Returns the format
|
||||
const GFXFormat getFormat() const { return mFormat; }
|
||||
|
||||
virtual const String describeSelf() const;
|
||||
};
|
||||
|
||||
/// A reference counted handle to a cubemap array resource.
|
||||
class GFXCubemapArrayHandle : public StrongRefPtr<GFXCubemapArray>
|
||||
{
|
||||
public:
|
||||
GFXCubemapArrayHandle() {}
|
||||
GFXCubemapArrayHandle(GFXCubemapArray *cubemapArray) { StrongRefPtr<GFXCubemapArray>::set(cubemapArray); }
|
||||
|
||||
/// Releases the texture handle.
|
||||
void free() { StrongObjectRef::set(NULL); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // GFXCUBEMAP
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ GFXDevice::GFXDevice()
|
|||
mNewTexture[i] = NULL;
|
||||
mCurrentCubemap[i] = NULL;
|
||||
mNewCubemap[i] = NULL;
|
||||
mCurrentCubemapArray[i] = NULL;
|
||||
mNewCubemapArray[i] = NULL;
|
||||
mTexType[i] = GFXTDT_Normal;
|
||||
|
||||
mTextureMatrix[i].identity();
|
||||
|
|
@ -262,6 +264,8 @@ GFXDevice::~GFXDevice()
|
|||
mNewTexture[i] = NULL;
|
||||
mCurrentCubemap[i] = NULL;
|
||||
mNewCubemap[i] = NULL;
|
||||
mCurrentCubemapArray[i] = NULL;
|
||||
mNewCubemapArray[i] = NULL;
|
||||
}
|
||||
|
||||
mCurrentRT = NULL;
|
||||
|
|
@ -398,6 +402,15 @@ void GFXDevice::updateStates(bool forceSetAll /*=false*/)
|
|||
setTextureInternal(i, NULL);
|
||||
}
|
||||
break;
|
||||
case GFXTDT_CubeArray:
|
||||
{
|
||||
mCurrentCubemapArray[i] = mNewCubemapArray[i];
|
||||
if (mCurrentCubemapArray[i])
|
||||
mCurrentCubemapArray[i]->setToTexUnit(i);
|
||||
else
|
||||
setTextureInternal(i, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "Unknown texture type!");
|
||||
break;
|
||||
|
|
@ -537,6 +550,15 @@ void GFXDevice::updateStates(bool forceSetAll /*=false*/)
|
|||
setTextureInternal(i, NULL);
|
||||
}
|
||||
break;
|
||||
case GFXTDT_CubeArray:
|
||||
{
|
||||
mCurrentCubemapArray[i] = mNewCubemapArray[i];
|
||||
if (mCurrentCubemapArray[i])
|
||||
mCurrentCubemapArray[i]->setToTexUnit(i);
|
||||
else
|
||||
setTextureInternal(i, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "Unknown texture type!");
|
||||
break;
|
||||
|
|
@ -777,30 +799,60 @@ void GFXDevice::setTexture( U32 stage, GFXTextureObject *texture )
|
|||
// Clear out the cubemaps
|
||||
mNewCubemap[stage] = NULL;
|
||||
mCurrentCubemap[stage] = NULL;
|
||||
mNewCubemapArray[stage] = NULL;
|
||||
mCurrentCubemapArray[stage] = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Set cube texture
|
||||
//-----------------------------------------------------------------------------
|
||||
void GFXDevice::setCubeTexture( U32 stage, GFXCubemap *texture )
|
||||
void GFXDevice::setCubeTexture( U32 stage, GFXCubemap *cubemap )
|
||||
{
|
||||
AssertFatal(stage < getNumSamplers(), "GFXDevice::setTexture - out of range stage!");
|
||||
|
||||
if ( mTexType[stage] == GFXTDT_Cube &&
|
||||
( ( mTextureDirty[stage] && mNewCubemap[stage].getPointer() == texture ) ||
|
||||
( !mTextureDirty[stage] && mCurrentCubemap[stage].getPointer() == texture ) ) )
|
||||
( ( mTextureDirty[stage] && mNewCubemap[stage].getPointer() == cubemap) ||
|
||||
( !mTextureDirty[stage] && mCurrentCubemap[stage].getPointer() == cubemap) ) )
|
||||
return;
|
||||
|
||||
mStateDirty = true;
|
||||
mTexturesDirty = true;
|
||||
mTextureDirty[stage] = true;
|
||||
|
||||
mNewCubemap[stage] = texture;
|
||||
mNewCubemap[stage] = cubemap;
|
||||
mTexType[stage] = GFXTDT_Cube;
|
||||
|
||||
// Clear out the normal textures
|
||||
// Clear out textures
|
||||
mNewTexture[stage] = NULL;
|
||||
mCurrentTexture[stage] = NULL;
|
||||
mNewCubemapArray[stage] = NULL;
|
||||
mCurrentCubemapArray[stage] = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Set cube texture array
|
||||
//-----------------------------------------------------------------------------
|
||||
void GFXDevice::setCubeArrayTexture(U32 stage, GFXCubemapArray *cubemapArray)
|
||||
{
|
||||
AssertFatal(stage < getNumSamplers(), avar("GFXDevice::setTexture - out of range stage! %i>%i", stage, getNumSamplers()));
|
||||
|
||||
if (mTexType[stage] == GFXTDT_CubeArray &&
|
||||
((mTextureDirty[stage] && mNewCubemapArray[stage].getPointer() == cubemapArray) ||
|
||||
(!mTextureDirty[stage] && mCurrentCubemapArray[stage].getPointer() == cubemapArray)))
|
||||
return;
|
||||
|
||||
mStateDirty = true;
|
||||
mTexturesDirty = true;
|
||||
mTextureDirty[stage] = true;
|
||||
|
||||
mNewCubemapArray[stage] = cubemapArray;
|
||||
mTexType[stage] = GFXTDT_CubeArray;
|
||||
|
||||
// Clear out textures
|
||||
mNewTexture[stage] = NULL;
|
||||
mCurrentTexture[stage] = NULL;
|
||||
mNewCubemap[stage] = NULL;
|
||||
mCurrentCubemap[stage] = NULL;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -497,13 +497,16 @@ protected:
|
|||
enum TexDirtyType
|
||||
{
|
||||
GFXTDT_Normal,
|
||||
GFXTDT_Cube
|
||||
GFXTDT_Cube,
|
||||
GFXTDT_CubeArray
|
||||
};
|
||||
|
||||
GFXTexHandle mCurrentTexture[TEXTURE_STAGE_COUNT];
|
||||
GFXTexHandle mNewTexture[TEXTURE_STAGE_COUNT];
|
||||
GFXCubemapHandle mCurrentCubemap[TEXTURE_STAGE_COUNT];
|
||||
GFXCubemapHandle mNewCubemap[TEXTURE_STAGE_COUNT];
|
||||
GFXCubemapArrayHandle mCurrentCubemapArray[TEXTURE_STAGE_COUNT];
|
||||
GFXCubemapArrayHandle mNewCubemapArray[TEXTURE_STAGE_COUNT];
|
||||
|
||||
TexDirtyType mTexType[TEXTURE_STAGE_COUNT];
|
||||
bool mTextureDirty[TEXTURE_STAGE_COUNT];
|
||||
|
|
@ -753,6 +756,7 @@ protected:
|
|||
|
||||
public:
|
||||
virtual GFXCubemap * createCubemap() = 0;
|
||||
virtual GFXCubemapArray *createCubemapArray() = 0;
|
||||
|
||||
inline GFXTextureManager *getTextureManager()
|
||||
{
|
||||
|
|
@ -778,7 +782,7 @@ public:
|
|||
|
||||
/// Allocate a target for doing render to texture operations, with no
|
||||
/// depth/stencil buffer.
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget()=0;
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true) = 0;
|
||||
|
||||
/// Allocate a target for a given window.
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window)=0;
|
||||
|
|
@ -809,7 +813,6 @@ public:
|
|||
virtual U32 getNumRenderTargets() const = 0;
|
||||
|
||||
virtual void setShader( GFXShader *shader, bool force = false ) {}
|
||||
virtual void disableShaders( bool force = false ) {} // TODO Remove when T3D 4.0
|
||||
|
||||
/// Set the buffer! (Actual set happens on the next draw call, just like textures, state blocks, etc)
|
||||
void setShaderConstBuffer(GFXShaderConstBuffer* buffer);
|
||||
|
|
@ -823,11 +826,19 @@ public:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/// @name Copying methods
|
||||
/// @{
|
||||
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) = 0;
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Rendering methods
|
||||
/// @{
|
||||
|
||||
///
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil ) = 0;
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color) = 0;
|
||||
virtual bool beginScene();
|
||||
virtual void endScene();
|
||||
virtual void beginField();
|
||||
|
|
@ -938,8 +949,9 @@ public:
|
|||
/// @{
|
||||
|
||||
///
|
||||
void setTexture(U32 stage, GFXTextureObject*texture);
|
||||
void setTexture(U32 stage, GFXTextureObject *texture);
|
||||
void setCubeTexture( U32 stage, GFXCubemap *cubemap );
|
||||
void setCubeArrayTexture( U32 stage, GFXCubemapArray *cubemapArray);
|
||||
inline GFXTextureObject* getCurrentTexture( U32 stage ) { return mCurrentTexture[stage]; }
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ enum GFXFormat
|
|||
GFXFormatR16G16,
|
||||
GFXFormatR16G16F,
|
||||
GFXFormatR10G10B10A2,
|
||||
GFXFormatR11G11B10,
|
||||
GFXFormatD32,
|
||||
GFXFormatD24X8,
|
||||
GFXFormatD24S8,
|
||||
|
|
@ -597,7 +598,8 @@ enum GFXShaderConstType
|
|||
GFXSCT_Int4,
|
||||
// Samplers
|
||||
GFXSCT_Sampler,
|
||||
GFXSCT_SamplerCube
|
||||
GFXSCT_SamplerCube,
|
||||
GFXSCT_SamplerCubeArray
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -196,6 +196,12 @@ public:
|
|||
///
|
||||
/// By default, this method will resolve all color targets.
|
||||
virtual void resolve()=0;
|
||||
|
||||
/// Returns true if the automatic generation of mip maps is enabled
|
||||
inline bool isGenMipsEnabled() const { return mGenMips; }
|
||||
|
||||
protected:
|
||||
bool mGenMips;
|
||||
};
|
||||
|
||||
typedef StrongRefPtr<GFXTarget> GFXTargetRef;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ GFXTexHandle::GFXTexHandle( const String &texName, GFXTextureProfile *profile, c
|
|||
set( texName, profile, desc );
|
||||
}
|
||||
|
||||
GFXTexHandle::GFXTexHandle(const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc)
|
||||
{
|
||||
set(texNameR, texNameG, texNameB, texNameA, inputKey, profile, desc);
|
||||
}
|
||||
|
||||
bool GFXTexHandle::set( const String &texName, GFXTextureProfile *profile, const String &desc )
|
||||
{
|
||||
// Clear the existing texture first, so that
|
||||
|
|
@ -70,6 +75,24 @@ bool GFXTexHandle::set( const String &texName, GFXTextureProfile *profile, const
|
|||
return isValid();
|
||||
}
|
||||
|
||||
bool GFXTexHandle::set(const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc)
|
||||
{
|
||||
// Clear the existing texture first, so that
|
||||
// its memory is free for the new allocation.
|
||||
free();
|
||||
|
||||
// Create and set the new texture.
|
||||
AssertFatal( texNameR.isNotEmpty(), "Texture name is empty" );
|
||||
StrongObjectRef::set( TEXMGR->createCompositeTexture( texNameR, texNameG, texNameB, texNameA, inputKey, profile ) );
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
if ( getPointer() )
|
||||
getPointer()->mDebugDescription = desc;
|
||||
#endif
|
||||
|
||||
return isValid();
|
||||
}
|
||||
|
||||
GFXTexHandle::GFXTexHandle( GBitmap *bmp, GFXTextureProfile *profile, bool deleteBmp, const String &desc )
|
||||
{
|
||||
set( bmp, profile, deleteBmp, desc );
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ public:
|
|||
GFXTexHandle( const String &texName, GFXTextureProfile *profile, const String &desc );
|
||||
bool set( const String &texName, GFXTextureProfile *profile, const String &desc );
|
||||
|
||||
// load composite
|
||||
GFXTexHandle(const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc);
|
||||
bool set( const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc );
|
||||
|
||||
// register texture
|
||||
GFXTexHandle( GBitmap *bmp, GFXTextureProfile *profile, bool deleteBmp, const String &desc );
|
||||
bool set( GBitmap *bmp, GFXTextureProfile *profile, bool deleteBmp, const String &desc );
|
||||
|
|
|
|||
|
|
@ -1122,7 +1122,8 @@ GFXTextureObject *GFXTextureManager::createCompositeTexture(GBitmap*bmp[4], U32
|
|||
}
|
||||
|
||||
U8 rChan, gChan, bChan, aChan;
|
||||
|
||||
GBitmap *outBitmap = new GBitmap();
|
||||
outBitmap->allocateBitmap(bmp[0]->getWidth(), bmp[0]->getHeight(),false, GFXFormatR8G8B8A8);
|
||||
//pack additional bitmaps into the origional
|
||||
for (U32 x = 0; x < bmp[0]->getWidth(); x++)
|
||||
{
|
||||
|
|
@ -1145,7 +1146,7 @@ GFXTextureObject *GFXTextureManager::createCompositeTexture(GBitmap*bmp[4], U32
|
|||
else
|
||||
aChan = 255;
|
||||
|
||||
bmp[0]->setColor(x, y, ColorI(rChan, gChan, bChan, aChan));
|
||||
outBitmap->setColor(x, y, ColorI(rChan, gChan, bChan, aChan));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1153,12 +1154,15 @@ GFXTextureObject *GFXTextureManager::createCompositeTexture(GBitmap*bmp[4], U32
|
|||
if (cacheHit != NULL)
|
||||
{
|
||||
// Con::errorf("Cached texture '%s'", (resourceName.isNotEmpty() ? resourceName.c_str() : "unknown"));
|
||||
if (deleteBmp)
|
||||
delete bmp[0];
|
||||
if (deleteBmp)
|
||||
{
|
||||
delete outBitmap;
|
||||
delete[] bmp;
|
||||
}
|
||||
return cacheHit;
|
||||
}
|
||||
|
||||
return _createTexture(bmp[0], resourceName, profile, deleteBmp, NULL);
|
||||
return _createTexture(outBitmap, resourceName, profile, deleteBmp, NULL);
|
||||
}
|
||||
|
||||
GFXTextureObject* GFXTextureManager::_findPooledTexure( U32 width,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "gfx/bitmap/imageUtils.h"
|
||||
|
||||
|
||||
GLenum GFXGLCubemap::faceList[6] =
|
||||
static GLenum faceList[6] =
|
||||
{
|
||||
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
|
||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
|
||||
|
|
@ -55,6 +55,11 @@ GFXGLCubemap::~GFXGLCubemap()
|
|||
GFXTextureManager::removeEventDelegate( this, &GFXGLCubemap::_onTextureEvent );
|
||||
}
|
||||
|
||||
GLenum GFXGLCubemap::getEnumForFaceNumber(U32 face)
|
||||
{
|
||||
return faceList[face];
|
||||
}
|
||||
|
||||
void GFXGLCubemap::fillCubeTextures(GFXTexHandle* faces)
|
||||
{
|
||||
AssertFatal( faces, "");
|
||||
|
|
@ -126,6 +131,7 @@ void GFXGLCubemap::initStatic(GFXTexHandle* faces)
|
|||
glGenTextures(1, &mCubemap);
|
||||
fillCubeTextures(faces);
|
||||
}
|
||||
mInitialized = true;
|
||||
}
|
||||
|
||||
void GFXGLCubemap::initStatic( DDSFile *dds )
|
||||
|
|
@ -165,7 +171,7 @@ void GFXGLCubemap::initStatic( DDSFile *dds )
|
|||
}
|
||||
|
||||
// convert to Z up
|
||||
const U32 faceIndex = _zUpFaceIndex(i);
|
||||
const U32 faceIndex = zUpFaceIndex(i);
|
||||
|
||||
// Now loop thru the mip levels!
|
||||
for (U32 mip = 0; mip < mMipMapLevels; ++mip)
|
||||
|
|
@ -179,9 +185,10 @@ void GFXGLCubemap::initStatic( DDSFile *dds )
|
|||
GFXGLTextureFormat[mFaceFormat], GFXGLTextureType[mFaceFormat], dds->mSurfaces[i]->mMips[mip]);
|
||||
}
|
||||
}
|
||||
mInitialized = true;
|
||||
}
|
||||
|
||||
void GFXGLCubemap::initDynamic(U32 texSize, GFXFormat faceFormat)
|
||||
void GFXGLCubemap::initDynamic(U32 texSize, GFXFormat faceFormat, U32 mipLevels)
|
||||
{
|
||||
mDynamicTexSize = texSize;
|
||||
mFaceFormat = faceFormat;
|
||||
|
|
@ -220,6 +227,7 @@ void GFXGLCubemap::initDynamic(U32 texSize, GFXFormat faceFormat)
|
|||
|
||||
if( !isCompressed )
|
||||
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
|
||||
mInitialized = true;
|
||||
}
|
||||
|
||||
void GFXGLCubemap::zombify()
|
||||
|
|
@ -277,3 +285,215 @@ void GFXGLCubemap::_onTextureEvent( GFXTexCallbackCode code )
|
|||
else
|
||||
tmResurrect();
|
||||
}
|
||||
|
||||
U8* GFXGLCubemap::getTextureData(U32 face, U32 mip)
|
||||
{
|
||||
AssertFatal(mMipMapLevels, "");
|
||||
mip = (mip < mMipMapLevels) ? mip : 0;
|
||||
const U32 bytesPerTexel = 8; //TODO make work with more formats!!!!!
|
||||
const U32 dataSize = ImageUtil::isCompressedFormat(mFaceFormat)
|
||||
? getCompressedSurfaceSize(mFaceFormat, mWidth, mHeight, mip)
|
||||
: (mWidth >> mip) * (mHeight >> mip) * bytesPerTexel;
|
||||
|
||||
U8* data = new U8[dataSize];
|
||||
PRESERVE_TEXTURE(GL_TEXTURE_CUBE_MAP);
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP, mCubemap);
|
||||
|
||||
if (ImageUtil::isCompressedFormat(mFaceFormat))
|
||||
glGetCompressedTexImage(faceList[face], mip, data);
|
||||
else
|
||||
glGetTexImage(faceList[face], mip, GFXGLTextureFormat[mFaceFormat], GFXGLTextureType[mFaceFormat], data);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Cubemap Array
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GFXGLCubemapArray::GFXGLCubemapArray()
|
||||
{
|
||||
}
|
||||
|
||||
GFXGLCubemapArray::~GFXGLCubemapArray()
|
||||
{
|
||||
glDeleteTextures(1, &mCubemap);
|
||||
}
|
||||
|
||||
//TODO: really need a common private 'init' function to avoid code double up with these init* functions
|
||||
void GFXGLCubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
|
||||
{
|
||||
AssertFatal(cubemaps, "GFXGLCubemapArray- Got null GFXCubemapHandle!");
|
||||
AssertFatal(*cubemaps, "GFXGLCubemapArray - Got empty cubemap!");
|
||||
|
||||
//all cubemaps must be the same size,format and number of mipmaps. Grab the details from the first cubemap
|
||||
mSize = cubemaps[0]->getSize();
|
||||
mFormat = cubemaps[0]->getFormat();
|
||||
mMipMapLevels = cubemaps[0]->getMipMapLevels();
|
||||
mNumCubemaps = cubemapCount;
|
||||
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
|
||||
|
||||
glGenTextures(1, &mCubemap);
|
||||
PRESERVE_CUBEMAP_ARRAY_TEXTURE();
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LEVEL, mMipMapLevels - 1);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
|
||||
for (U32 i = 0; i < cubemapCount; i++)
|
||||
{
|
||||
GFXGLCubemap* glTex = static_cast<GFXGLCubemap*>(cubemaps[i].getPointer());
|
||||
for (U32 face = 0; face < 6; face++)
|
||||
{
|
||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
{
|
||||
U8 *pixelData = glTex->getTextureData(face, currentMip);
|
||||
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
const U32 mipSize = getMax(U32(1), mSize >> currentMip);
|
||||
if (isCompressed)
|
||||
{
|
||||
const U32 mipDataSize = getCompressedSurfaceSize(mFormat, mSize, mSize, currentMip);
|
||||
glCompressedTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, i * 6 + face, mipSize, mipSize, 1, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, i * 6 + face, mipSize, mipSize, 1, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
|
||||
}
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, 0);
|
||||
|
||||
delete[] pixelData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Just allocate the cubemap array but we don't upload any data
|
||||
void GFXGLCubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format)
|
||||
{
|
||||
//all cubemaps must be the same size,format and number of mipmaps. Grab the details from the first cubemap
|
||||
mSize = cubemapFaceSize;
|
||||
mFormat = format;
|
||||
mMipMapLevels = ImageUtil::getMaxMipCount(cubemapFaceSize, cubemapFaceSize);
|
||||
mNumCubemaps = cubemapCount;
|
||||
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
|
||||
|
||||
glGenTextures(1, &mCubemap);
|
||||
PRESERVE_CUBEMAP_ARRAY_TEXTURE();
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
|
||||
for (U32 i = 0; i < mMipMapLevels; i++)
|
||||
{
|
||||
const U32 mipSize = getMax(U32(1), mSize >> i);
|
||||
glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i, GFXGLTextureInternalFormat[mFormat], mipSize, mipSize, cubemapCount * 6, 0, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], NULL);
|
||||
}
|
||||
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LEVEL, mMipMapLevels - 1);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
}
|
||||
|
||||
void GFXGLCubemapArray::updateTexture(const GFXCubemapHandle &cubemap, const U32 slot)
|
||||
{
|
||||
AssertFatal(slot <= mNumCubemaps, "GFXD3D11CubemapArray::updateTexture - trying to update a cubemap texture that is out of bounds!");
|
||||
if (!cubemap->isInitialized())
|
||||
return;
|
||||
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
|
||||
|
||||
GFXGLCubemap* glTex = static_cast<GFXGLCubemap*>(cubemap.getPointer());
|
||||
for (U32 face = 0; face < 6; face++)
|
||||
{
|
||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
{
|
||||
U8 *pixelData = glTex->getTextureData(face, currentMip);
|
||||
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
const U32 mipSize = getMax(U32(1), mSize >> currentMip);
|
||||
if (isCompressed)
|
||||
{
|
||||
const U32 mipDataSize = getCompressedSurfaceSize(mFormat, mSize, mSize, currentMip);
|
||||
glCompressedTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, slot * 6 + face, mipSize, mipSize, 1, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, slot * 6 + face, mipSize, mipSize, 1, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
|
||||
}
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, 0);
|
||||
|
||||
delete[] pixelData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GFXGLCubemapArray::copyTo(GFXCubemapArray *pDstCubemap)
|
||||
{
|
||||
AssertFatal(pDstCubemap, "GFXGLCubemapArray::copyTo - Got null GFXCubemapArray");
|
||||
|
||||
const U32 dstCount = pDstCubemap->getNumCubemaps();
|
||||
const GFXFormat dstFmt = pDstCubemap->getFormat();
|
||||
const U32 dstSize = pDstCubemap->getSize();
|
||||
const U32 dstMips = pDstCubemap->getMipMapLevels();
|
||||
|
||||
AssertFatal(dstCount > mNumCubemaps, "GFXGLCubemapArray::copyTo - Destination too small");
|
||||
AssertFatal(dstFmt == mFormat, "GFXGLCubemapArray::copyTo - Destination format doesn't match");
|
||||
AssertFatal(dstSize == mSize, "GFXGLCubemapArray::copyTo - Destination size doesn't match");
|
||||
AssertFatal(dstMips == mMipMapLevels, "GFXGLCubemapArray::copyTo - Destination mip levels doesn't match");
|
||||
|
||||
GFXGLCubemapArray* pDstCube = static_cast<GFXGLCubemapArray*>(pDstCubemap);
|
||||
|
||||
for (U32 cubeMap = 0; cubeMap < mNumCubemaps; cubeMap++)
|
||||
{
|
||||
for (U32 face = 0; face < CubeFaces; face++)
|
||||
{
|
||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||
//U32 currentMip = 0;
|
||||
{
|
||||
//U8 *pixelData = pDstCube->get->getTextureData(face, currentMip);
|
||||
const U32 mipSize = getMax(U32(1), mSize >> currentMip);
|
||||
/*if (isCompressed)
|
||||
{
|
||||
const U32 mipDataSize = getCompressedSurfaceSize(mFormat, mSize, mSize, currentMip);
|
||||
glCompressedTexImage2D(faceList[face], currentMip, GFXGLTextureInternalFormat[mFormat], mipSize, mipSize, 0, mipDataSize, pixelData);
|
||||
}
|
||||
else
|
||||
{*/ //TODO figure out xyzOffsets
|
||||
glCopyImageSubData(mCubemap, GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, cubeMap * face, pDstCube->mCubemap, GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, cubeMap * face, mipSize, mipSize, 6);
|
||||
//glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
//glTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, 0, mipSize, mipSize, CubeFaces, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
|
||||
//}
|
||||
//delete[] pixelData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GFXGLCubemapArray::setToTexUnit(U32 tuNum)
|
||||
{
|
||||
static_cast<GFXGLDevice*>(getOwningDevice())->setCubemapArrayInternal(tuNum, this);
|
||||
}
|
||||
|
||||
void GFXGLCubemapArray::bind(U32 textureUnit) const
|
||||
{
|
||||
glActiveTexture(GL_TEXTURE0 + textureUnit);
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
static_cast<GFXGLDevice*>(getOwningDevice())->getOpenglCache()->setCacheBindedTex(textureUnit, GL_TEXTURE_CUBE_MAP_ARRAY, mCubemap);
|
||||
|
||||
GFXGLStateBlockRef sb = static_cast<GFXGLDevice*>(GFX)->getCurrentStateBlock();
|
||||
AssertFatal(sb, "GFXGLCubemap::bind - No active stateblock!");
|
||||
if (!sb)
|
||||
return;
|
||||
|
||||
const GFXSamplerStateDesc& ssd = sb->getDesc().samplers[textureUnit];
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, minificationFilter(ssd.minFilter, ssd.mipFilter, 0));
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAG_FILTER, GFXGLTextureFilter[ssd.magFilter]);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GFXGLTextureAddress[ssd.addressModeU]);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GFXGLTextureAddress[ssd.addressModeV]);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_R, GFXGLTextureAddress[ssd.addressModeW]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
const U32 CubeFaces = 6;
|
||||
const U32 MaxMipMaps = 13; //todo this needs a proper static value somewhere to sync up with other classes like GBitmap
|
||||
|
||||
|
||||
class GFXGLCubemap : public GFXCubemap
|
||||
{
|
||||
|
|
@ -39,10 +42,12 @@ public:
|
|||
|
||||
virtual void initStatic( GFXTexHandle *faces );
|
||||
virtual void initStatic( DDSFile *dds );
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8 );
|
||||
virtual void initDynamic( U32 texSize, GFXFormat faceFormat = GFXFormatR8G8B8A8, U32 mipLevels = 0);
|
||||
virtual U32 getSize() const { return mWidth; }
|
||||
virtual GFXFormat getFormat() const { return mFaceFormat; }
|
||||
|
||||
virtual bool isInitialized() { return mCubemap != 0 ? true : false; }
|
||||
|
||||
// Convenience methods for GFXGLTextureTarget
|
||||
U32 getWidth() { return mWidth; }
|
||||
U32 getHeight() { return mHeight; }
|
||||
|
|
@ -55,7 +60,11 @@ public:
|
|||
/// Called by texCB; this is to ensure that all textures have been resurrected before we attempt to res the cubemap.
|
||||
void tmResurrect();
|
||||
|
||||
static GLenum getEnumForFaceNumber(U32 face) { return faceList[face]; } ///< Performs lookup to get a GLenum for the given face number
|
||||
static GLenum getEnumForFaceNumber(U32 face);///< Performs lookup to get a GLenum for the given face number
|
||||
|
||||
/// @return An array containing the texture data
|
||||
/// @note You are responsible for deleting the returned data! (Use delete[])
|
||||
U8* getTextureData(U32 face, U32 mip = 0);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -85,7 +94,29 @@ protected:
|
|||
virtual void bind(U32 textureUnit) const; ///< Notifies our owning device that we want to be set to the given texture unit (used for GL internal state tracking)
|
||||
void fillCubeTextures(GFXTexHandle* faces); ///< Copies the textures in faces into the cubemap
|
||||
|
||||
static GLenum faceList[6]; ///< Lookup table
|
||||
};
|
||||
|
||||
class GFXGLCubemapArray : public GFXCubemapArray
|
||||
{
|
||||
public:
|
||||
GFXGLCubemapArray();
|
||||
virtual ~GFXGLCubemapArray();
|
||||
//virtual void initStatic(GFXCubemapHandle *cubemaps, const U32 cubemapCount);
|
||||
virtual void init(GFXCubemapHandle *cubemaps, const U32 cubemapCount);
|
||||
virtual void init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format);
|
||||
virtual void updateTexture(const GFXCubemapHandle &cubemap, const U32 slot);
|
||||
virtual void copyTo(GFXCubemapArray *pDstCubemap);
|
||||
virtual void setToTexUnit(U32 tuNum);
|
||||
|
||||
// GFXResource interface
|
||||
virtual void zombify() {}
|
||||
virtual void resurrect() {}
|
||||
|
||||
protected:
|
||||
friend class GFXGLDevice;
|
||||
void bind(U32 textureUnit) const;
|
||||
GLuint mCubemap; ///< Internal GL handle
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -448,6 +448,13 @@ GFXCubemap* GFXGLDevice::createCubemap()
|
|||
return cube;
|
||||
};
|
||||
|
||||
GFXCubemapArray *GFXGLDevice::createCubemapArray()
|
||||
{
|
||||
GFXGLCubemapArray* cubeArray = new GFXGLCubemapArray();
|
||||
cubeArray->registerResourceWithDevice(this);
|
||||
return cubeArray;
|
||||
}
|
||||
|
||||
void GFXGLDevice::endSceneInternal()
|
||||
{
|
||||
// nothing to do for opengl
|
||||
|
|
@ -495,6 +502,12 @@ void GFXGLDevice::clear(U32 flags, const LinearColorF& color, F32 z, U32 stencil
|
|||
glStencilMask(desc->stencilWriteMask);
|
||||
}
|
||||
|
||||
void GFXGLDevice::clearColorAttachment(const U32 attachment, const LinearColorF& color)
|
||||
{
|
||||
const GLfloat clearColor[4] = { color.red, color.green, color.blue, color.alpha };
|
||||
glClearBufferfv(GL_COLOR, attachment, clearColor);
|
||||
}
|
||||
|
||||
// Given a primitive type and a number of primitives, return the number of indexes/vertexes used.
|
||||
inline GLsizei GFXGLDevice::primCountToIndexCount(GFXPrimitiveType primType, U32 primitiveCount)
|
||||
{
|
||||
|
|
@ -669,6 +682,22 @@ void GFXGLDevice::setCubemapInternal(U32 textureUnit, const GFXGLCubemap* textur
|
|||
}
|
||||
}
|
||||
|
||||
void GFXGLDevice::setCubemapArrayInternal(U32 textureUnit, const GFXGLCubemapArray* texture)
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
mActiveTextureType[textureUnit] = GL_TEXTURE_CUBE_MAP_ARRAY;
|
||||
texture->bind(textureUnit);
|
||||
}
|
||||
else if (mActiveTextureType[textureUnit] != GL_ZERO)
|
||||
{
|
||||
glActiveTexture(GL_TEXTURE0 + textureUnit);
|
||||
glBindTexture(mActiveTextureType[textureUnit], 0);
|
||||
getOpenglCache()->setCacheBindedTex(textureUnit, mActiveTextureType[textureUnit], 0);
|
||||
mActiveTextureType[textureUnit] = GL_ZERO;
|
||||
}
|
||||
}
|
||||
|
||||
void GFXGLDevice::setMatrix( GFXMatrixType mtype, const MatrixF &mat )
|
||||
{
|
||||
// ONLY NEEDED ON FFP
|
||||
|
|
@ -749,9 +778,9 @@ void GFXGLDevice::setStateBlockInternal(GFXStateBlock* block, bool force)
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
GFXTextureTarget * GFXGLDevice::allocRenderToTextureTarget()
|
||||
GFXTextureTarget * GFXGLDevice::allocRenderToTextureTarget(bool genMips)
|
||||
{
|
||||
GFXGLTextureTarget *targ = new GFXGLTextureTarget();
|
||||
GFXGLTextureTarget *targ = new GFXGLTextureTarget(genMips);
|
||||
targ->registerResourceWithDevice(this);
|
||||
return targ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class GFXGLVertexBuffer;
|
|||
class GFXGLPrimitiveBuffer;
|
||||
class GFXGLTextureTarget;
|
||||
class GFXGLCubemap;
|
||||
class GFXGLCubemapArray;
|
||||
class GFXGLStateCache;
|
||||
class GFXGLVertexDecl;
|
||||
|
||||
|
|
@ -81,6 +82,7 @@ public:
|
|||
virtual U32 getTotalVideoMemory();
|
||||
|
||||
virtual GFXCubemap * createCubemap();
|
||||
virtual GFXCubemapArray *createCubemapArray();
|
||||
|
||||
virtual F32 getFillConventionOffset() const { return 0.0f; }
|
||||
|
||||
|
|
@ -91,7 +93,7 @@ public:
|
|||
/// @{
|
||||
|
||||
///
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget();
|
||||
virtual GFXTextureTarget *allocRenderToTextureTarget(bool genMips = true);
|
||||
virtual GFXWindowTarget *allocWindowTarget(PlatformWindow *window);
|
||||
virtual void _updateRenderTargets();
|
||||
|
||||
|
|
@ -115,8 +117,10 @@ public:
|
|||
virtual U32 getNumRenderTargets() const;
|
||||
|
||||
virtual GFXShader* createShader();
|
||||
|
||||
//TODO: implement me!
|
||||
virtual void copyResource(GFXTextureObject *pDst, GFXCubemap *pSrc, const U32 face) {};
|
||||
virtual void clear( U32 flags, const LinearColorF& color, F32 z, U32 stencil );
|
||||
virtual void clearColorAttachment(const U32 attachment, const LinearColorF& color);
|
||||
virtual bool beginSceneInternal();
|
||||
virtual void endSceneInternal();
|
||||
|
||||
|
|
@ -167,7 +171,8 @@ protected:
|
|||
virtual void setShaderConstBufferInternal(GFXShaderConstBuffer* buffer);
|
||||
|
||||
virtual void setTextureInternal(U32 textureUnit, const GFXTextureObject*texture);
|
||||
virtual void setCubemapInternal(U32 cubemap, const GFXGLCubemap* texture);
|
||||
virtual void setCubemapInternal(U32 textureUnit, const GFXGLCubemap* texture);
|
||||
virtual void setCubemapArrayInternal(U32 textureUnit, const GFXGLCubemapArray* texture);
|
||||
|
||||
virtual void setLightInternal(U32 lightStage, const GFXLightInfo light, bool lightEnable);
|
||||
virtual void setLightMaterialInternal(const GFXLightMaterial mat);
|
||||
|
|
@ -204,11 +209,12 @@ private:
|
|||
|
||||
friend class GFXGLTextureObject;
|
||||
friend class GFXGLCubemap;
|
||||
friend class GFXGLCubemapArray;
|
||||
friend class GFXGLWindowTarget;
|
||||
friend class GFXGLPrimitiveBuffer;
|
||||
friend class GFXGLVertexBuffer;
|
||||
|
||||
static GFXAdapter::CreateDeviceInstanceDelegate mCreateDeviceInstance;
|
||||
static GFXAdapter::CreateDeviceInstanceDelegate mCreateDeviceInstance;
|
||||
|
||||
U32 mAdapterIndex;
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ void GFXGLEnumTranslate::init()
|
|||
GFXGLTextureInternalFormat[GFXFormatR8G8B8X8] = GL_RGBA8;
|
||||
GFXGLTextureInternalFormat[GFXFormatB8G8R8A8] = GL_RGBA8;
|
||||
GFXGLTextureInternalFormat[GFXFormatR10G10B10A2] = GL_RGB10_A2;
|
||||
GFXGLTextureInternalFormat[GFXFormatR11G11B10] = GL_R11F_G11F_B10F;
|
||||
GFXGLTextureInternalFormat[GFXFormatD32] = GL_DEPTH_COMPONENT32;
|
||||
GFXGLTextureInternalFormat[GFXFormatD24X8] = GL_DEPTH24_STENCIL8;
|
||||
GFXGLTextureInternalFormat[GFXFormatD24S8] = GL_DEPTH24_STENCIL8;
|
||||
|
|
@ -165,6 +166,7 @@ void GFXGLEnumTranslate::init()
|
|||
GFXGLTextureFormat[GFXFormatR8G8B8X8] = GL_RGBA;
|
||||
GFXGLTextureFormat[GFXFormatB8G8R8A8] = GL_BGRA;
|
||||
GFXGLTextureFormat[GFXFormatR10G10B10A2] = GL_RGBA;
|
||||
GFXGLTextureFormat[GFXFormatR11G11B10] = GL_RGB;
|
||||
GFXGLTextureFormat[GFXFormatD32] = GL_DEPTH_COMPONENT;
|
||||
GFXGLTextureFormat[GFXFormatD24X8] = GL_DEPTH_STENCIL;
|
||||
GFXGLTextureFormat[GFXFormatD24S8] = GL_DEPTH_STENCIL;
|
||||
|
|
@ -192,6 +194,7 @@ void GFXGLEnumTranslate::init()
|
|||
GFXGLTextureType[GFXFormatR8G8B8X8] = GL_UNSIGNED_BYTE;
|
||||
GFXGLTextureType[GFXFormatB8G8R8A8] = GL_UNSIGNED_BYTE;;
|
||||
GFXGLTextureType[GFXFormatR10G10B10A2] = GL_UNSIGNED_INT_10_10_10_2;
|
||||
GFXGLTextureType[GFXFormatR11G11B10] = GL_UNSIGNED_INT_10F_11F_11F_REV;
|
||||
GFXGLTextureType[GFXFormatD32] = GL_UNSIGNED_INT;
|
||||
GFXGLTextureType[GFXFormatD24X8] = GL_UNSIGNED_INT_24_8;
|
||||
GFXGLTextureType[GFXFormatD24S8] = GL_UNSIGNED_INT_24_8;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@
|
|||
#include "gfx/gl/tGL/tGL.h"
|
||||
|
||||
GFXGLOcclusionQuery::GFXGLOcclusionQuery(GFXDevice* device) :
|
||||
GFXOcclusionQuery(device), mQuery(-1)
|
||||
GFXOcclusionQuery(device),
|
||||
mQuery(-1),
|
||||
mTesting(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -37,16 +39,29 @@ GFXGLOcclusionQuery::~GFXGLOcclusionQuery()
|
|||
|
||||
bool GFXGLOcclusionQuery::begin()
|
||||
{
|
||||
if(mQuery == -1)
|
||||
if (GFXDevice::getDisableOcclusionQuery())
|
||||
return true;
|
||||
|
||||
if (!glIsQuery(mQuery))
|
||||
glGenQueries(1, &mQuery);
|
||||
|
||||
glBeginQuery(GL_SAMPLES_PASSED, mQuery);
|
||||
if (!mTesting)
|
||||
{
|
||||
glBeginQuery(GL_SAMPLES_PASSED, mQuery);
|
||||
mTesting = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void GFXGLOcclusionQuery::end()
|
||||
{
|
||||
if (GFXDevice::getDisableOcclusionQuery())
|
||||
return;
|
||||
|
||||
if (!glIsQuery(mQuery))
|
||||
return;
|
||||
glEndQuery(GL_SAMPLES_PASSED);
|
||||
mTesting = false;
|
||||
}
|
||||
|
||||
GFXOcclusionQuery::OcclusionQueryStatus GFXGLOcclusionQuery::getStatus(bool block, U32* data)
|
||||
|
|
@ -55,16 +70,33 @@ GFXOcclusionQuery::OcclusionQueryStatus GFXGLOcclusionQuery::getStatus(bool bloc
|
|||
// then your system is GPU bound.
|
||||
PROFILE_SCOPE(GFXGLOcclusionQuery_getStatus);
|
||||
|
||||
if(mQuery == -1)
|
||||
if (GFXDevice::getDisableOcclusionQuery())
|
||||
return NotOccluded;
|
||||
|
||||
if (!glIsQuery(mQuery))
|
||||
return NotOccluded;
|
||||
|
||||
GLint numPixels = 0;
|
||||
GLint queryDone = false;
|
||||
|
||||
if (block)
|
||||
queryDone = true;
|
||||
{
|
||||
while (!queryDone)
|
||||
{
|
||||
//If we're stalled out, proceed with worst-case scenario -BJR
|
||||
if (GFX->mFrameTime->getElapsedMs()>4)
|
||||
{
|
||||
this->begin();
|
||||
this->end();
|
||||
return NotOccluded;
|
||||
}
|
||||
glGetQueryObjectiv(mQuery, GL_QUERY_RESULT_AVAILABLE, &queryDone);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glGetQueryObjectiv(mQuery, GL_QUERY_RESULT_AVAILABLE, &queryDone);
|
||||
}
|
||||
|
||||
if (queryDone)
|
||||
glGetQueryObjectiv(mQuery, GL_QUERY_RESULT, &numPixels);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
private:
|
||||
U32 mQuery;
|
||||
bool mTesting;
|
||||
};
|
||||
|
||||
#endif // _GFX_GL_OCCLUSIONQUERY_H_
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ static U32 shaderConstTypeSize(GFXShaderConstType type)
|
|||
case GFXSCT_Int:
|
||||
case GFXSCT_Sampler:
|
||||
case GFXSCT_SamplerCube:
|
||||
case GFXSCT_SamplerCubeArray:
|
||||
return 4;
|
||||
case GFXSCT_Float2:
|
||||
case GFXSCT_Int2:
|
||||
|
|
@ -625,6 +626,9 @@ void GFXGLShader::initConstantDescs()
|
|||
case GL_SAMPLER_CUBE:
|
||||
desc.constType = GFXSCT_SamplerCube;
|
||||
break;
|
||||
case GL_SAMPLER_CUBE_MAP_ARRAY:
|
||||
desc.constType = GFXSCT_SamplerCubeArray;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "GFXGLShader::initConstantDescs - unrecognized uniform type");
|
||||
// If we don't recognize the constant don't add its description.
|
||||
|
|
@ -656,7 +660,7 @@ void GFXGLShader::initHandles()
|
|||
|
||||
HandleMap::Iterator handle = mHandles.find(desc.name);
|
||||
S32 sampler = -1;
|
||||
if(desc.constType == GFXSCT_Sampler || desc.constType == GFXSCT_SamplerCube)
|
||||
if(desc.constType == GFXSCT_Sampler || desc.constType == GFXSCT_SamplerCube || desc.constType == GFXSCT_SamplerCubeArray)
|
||||
{
|
||||
S32 idx = mSamplerNamesOrdered.find_next(desc.name);
|
||||
AssertFatal(idx != -1, "");
|
||||
|
|
@ -699,7 +703,7 @@ void GFXGLShader::initHandles()
|
|||
for (HandleMap::Iterator iter = mHandles.begin(); iter != mHandles.end(); ++iter)
|
||||
{
|
||||
GFXGLShaderConstHandle* handle = iter->value;
|
||||
if(handle->isValid() && (handle->getType() == GFXSCT_Sampler || handle->getType() == GFXSCT_SamplerCube))
|
||||
if(handle->isValid() && (handle->getType() == GFXSCT_Sampler || handle->getType() == GFXSCT_SamplerCube || handle->getType() == GFXSCT_SamplerCubeArray))
|
||||
{
|
||||
// Set sampler number on our program.
|
||||
glUniform1i(handle->mLocation, handle->mSamplerNum);
|
||||
|
|
@ -831,6 +835,7 @@ void GFXGLShader::setConstantsFromBuffer(GFXGLShaderConstBuffer* buffer)
|
|||
case GFXSCT_Int:
|
||||
case GFXSCT_Sampler:
|
||||
case GFXSCT_SamplerCube:
|
||||
case GFXSCT_SamplerCubeArray:
|
||||
glUniform1iv(handle->mLocation, handle->mDesc.arraySize, (GLint*)(mConstBuffer + handle->mOffset));
|
||||
break;
|
||||
case GFXSCT_Int2:
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ public:
|
|||
class TextureUnit
|
||||
{
|
||||
public:
|
||||
TextureUnit() : mTexture1D(0), mTexture2D(0), mTexture3D(0), mTextureCube(0)
|
||||
TextureUnit() : mTexture1D(0), mTexture2D(0), mTexture3D(0), mTextureCube(0), mTextureCubeArray(0)
|
||||
{
|
||||
|
||||
}
|
||||
GLuint mTexture1D, mTexture2D, mTexture3D, mTextureCube;
|
||||
GLuint mTexture1D, mTexture2D, mTexture3D, mTextureCube, mTextureCubeArray;
|
||||
};
|
||||
|
||||
/// after glBindTexture
|
||||
|
|
@ -45,6 +45,9 @@ public:
|
|||
case GL_TEXTURE_CUBE_MAP:
|
||||
mTextureUnits[mActiveTexture].mTextureCube = handle;
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
mTextureUnits[mActiveTexture].mTextureCubeArray = handle;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(0, avar("GFXGLStateCache::setCacheBindedTex - binding (%x) not supported.", biding) );
|
||||
return;
|
||||
|
|
@ -68,6 +71,9 @@ public:
|
|||
case GL_TEXTURE_CUBE_MAP:
|
||||
mTextureUnits[mActiveTexture].mTextureCube = handle;
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
mTextureUnits[mActiveTexture].mTextureCubeArray = handle;
|
||||
break;
|
||||
case GL_FRAMEBUFFER:
|
||||
mBindedFBO_W = mBindedFBO_R = handle;
|
||||
break;
|
||||
|
|
@ -101,6 +107,8 @@ public:
|
|||
return mTextureUnits[mActiveTexture].mTexture1D;
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
return mTextureUnits[mActiveTexture].mTextureCube;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY:
|
||||
return mTextureUnits[mActiveTexture].mTextureCubeArray;
|
||||
case GL_DRAW_FRAMEBUFFER:
|
||||
return mBindedFBO_W;
|
||||
case GL_READ_FRAMEBUFFER:
|
||||
|
|
|
|||
|
|
@ -149,14 +149,9 @@ bool GFXGLTextureObject::copyToBmp(GBitmap * bmp)
|
|||
// check format limitations
|
||||
// at the moment we only support RGBA for the source (other 4 byte formats should
|
||||
// be easy to add though)
|
||||
AssertFatal(mFormat == GFXFormatR8G8B8A8 || mFormat == GFXFormatR8G8B8A8_SRGB , "GFXGLTextureObject::copyToBmp - invalid format");
|
||||
AssertFatal(bmp->getFormat() == GFXFormatR8G8B8A8 || bmp->getFormat() == GFXFormatR8G8B8 || bmp->getFormat() == GFXFormatR8G8B8A8_SRGB, "GFXGLTextureObject::copyToBmp - invalid format");
|
||||
|
||||
if(mFormat != GFXFormatR8G8B8A8 && mFormat != GFXFormatR8G8B8A8_SRGB)
|
||||
return false;
|
||||
|
||||
if(bmp->getFormat() != GFXFormatR8G8B8A8 && bmp->getFormat() != GFXFormatR8G8B8 && bmp->getFormat() != GFXFormatR8G8B8A8_SRGB )
|
||||
return false;
|
||||
AssertFatal(mFormat == GFXFormatR16G16B16A16F || mFormat == GFXFormatR8G8B8A8 || mFormat == GFXFormatR8G8B8A8_LINEAR_FORCE || mFormat == GFXFormatR8G8B8A8_SRGB, "copyToBmp: invalid format");
|
||||
if (mFormat != GFXFormatR16G16B16A16F && mFormat != GFXFormatR8G8B8A8 && mFormat != GFXFormatR8G8B8A8_LINEAR_FORCE && mFormat != GFXFormatR8G8B8A8_SRGB)
|
||||
return false;
|
||||
|
||||
AssertFatal(bmp->getWidth() == getWidth(), "GFXGLTextureObject::copyToBmp - invalid size");
|
||||
AssertFatal(bmp->getHeight() == getHeight(), "GFXGLTextureObject::copyToBmp - invalid size");
|
||||
|
|
@ -168,11 +163,6 @@ bool GFXGLTextureObject::copyToBmp(GBitmap * bmp)
|
|||
|
||||
U8 dstBytesPerPixel = GFXFormat_getByteSize( bmp->getFormat() );
|
||||
U8 srcBytesPerPixel = GFXFormat_getByteSize( mFormat );
|
||||
if(dstBytesPerPixel == srcBytesPerPixel)
|
||||
{
|
||||
glGetTexImage(mBinding, 0, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], bmp->getWritableBits());
|
||||
return true;
|
||||
}
|
||||
|
||||
FrameAllocatorMarker mem;
|
||||
|
||||
|
|
@ -183,16 +173,23 @@ bool GFXGLTextureObject::copyToBmp(GBitmap * bmp)
|
|||
glGetTexImage(mBinding, 0, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], orig);
|
||||
|
||||
PROFILE_START(GFXGLTextureObject_copyToBmp_pixCopy);
|
||||
for(int i = 0; i < srcPixelCount; ++i)
|
||||
if (mFormat == GFXFormatR16G16B16A16F)
|
||||
{
|
||||
dest[0] = orig[0];
|
||||
dest[1] = orig[1];
|
||||
dest[2] = orig[2];
|
||||
if(dstBytesPerPixel == 4)
|
||||
dest[3] = orig[3];
|
||||
dMemcpy(dest, orig, sizeof(U16) * 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < srcPixelCount; ++i)
|
||||
{
|
||||
dest[0] = orig[0];
|
||||
dest[1] = orig[1];
|
||||
dest[2] = orig[2];
|
||||
if (dstBytesPerPixel == 4)
|
||||
dest[3] = orig[3];
|
||||
|
||||
orig += srcBytesPerPixel;
|
||||
dest += dstBytesPerPixel;
|
||||
orig += srcBytesPerPixel;
|
||||
dest += dstBytesPerPixel;
|
||||
}
|
||||
}
|
||||
PROFILE_END();
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ class _GFXGLTextureTargetFBOImpl : public _GFXGLTextureTargetImpl
|
|||
{
|
||||
public:
|
||||
GLuint mFramebuffer;
|
||||
bool mGenMips;
|
||||
|
||||
_GFXGLTextureTargetFBOImpl(GFXGLTextureTarget* target);
|
||||
virtual ~_GFXGLTextureTargetFBOImpl();
|
||||
|
|
@ -147,6 +148,7 @@ public:
|
|||
|
||||
_GFXGLTextureTargetFBOImpl::_GFXGLTextureTargetFBOImpl(GFXGLTextureTarget* target)
|
||||
{
|
||||
mGenMips = target->isGenMipsEnabled();
|
||||
mTarget = target;
|
||||
glGenFramebuffers(1, &mFramebuffer);
|
||||
}
|
||||
|
|
@ -245,6 +247,9 @@ void _GFXGLTextureTargetFBOImpl::finish()
|
|||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
GFXGL->getOpenglCache()->setCacheBinded(GL_FRAMEBUFFER, 0);
|
||||
|
||||
if (!mGenMips)
|
||||
return;
|
||||
|
||||
for(int i = 0; i < GFXGL->getNumRenderTargets(); ++i)
|
||||
{
|
||||
_GFXGLTargetDesc* color = mTarget->getTargetDesc( static_cast<GFXTextureTarget::RenderSlot>(GFXTextureTarget::Color0+i ) );
|
||||
|
|
@ -263,8 +268,9 @@ void _GFXGLTextureTargetFBOImpl::finish()
|
|||
}
|
||||
|
||||
// Actual GFXGLTextureTarget interface
|
||||
GFXGLTextureTarget::GFXGLTextureTarget() : mCopyFboSrc(0), mCopyFboDst(0)
|
||||
GFXGLTextureTarget::GFXGLTextureTarget(bool genMips) : mCopyFboSrc(0), mCopyFboDst(0)
|
||||
{
|
||||
mGenMips = genMips;
|
||||
for(U32 i=0; i<MaxRenderSlotId; i++)
|
||||
mTargets[i] = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class _GFXGLTextureTargetImpl;
|
|||
class GFXGLTextureTarget : public GFXTextureTarget
|
||||
{
|
||||
public:
|
||||
GFXGLTextureTarget();
|
||||
GFXGLTextureTarget(bool genMips);
|
||||
virtual ~GFXGLTextureTarget();
|
||||
|
||||
virtual const Point2I getSize();
|
||||
|
|
|
|||
|
|
@ -191,6 +191,9 @@ GFXGLPreserveTexture TORQUE_CONCAT(preserve_, __LINE__) (GL_TEXTURE_3D, GL_TEXTU
|
|||
#define PRESERVE_CUBEMAP_TEXTURE() \
|
||||
GFXGLPreserveTexture TORQUE_CONCAT(preserve_, __LINE__) (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BINDING_CUBE_MAP, (GFXGLPreserveInteger::BindFn)glBindTexture)
|
||||
|
||||
#define PRESERVE_CUBEMAP_ARRAY_TEXTURE() \
|
||||
GFXGLPreserveTexture TORQUE_CONCAT(preserve_, __LINE__) (GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, (GFXGLPreserveInteger::BindFn)glBindTexture)
|
||||
|
||||
#define _GET_TEXTURE_BINDING(binding) \
|
||||
binding == GL_TEXTURE_2D ? GL_TEXTURE_BINDING_2D : (binding == GL_TEXTURE_3D ? GL_TEXTURE_BINDING_3D : GL_TEXTURE_BINDING_1D )
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "scene/sceneManager.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT( CubemapData );
|
||||
|
||||
|
|
@ -111,7 +112,7 @@ void CubemapData::createMap()
|
|||
{
|
||||
if (!mCubeFaceFile[i].isEmpty())
|
||||
{
|
||||
if (!mCubeFace[i].set(mCubeFaceFile[i], &GFXStaticTextureProfile, avar("%s() - mCubeFace[%d] (line %d)", __FUNCTION__, i, __LINE__)))
|
||||
if (!mCubeFace[i].set(mCubeFaceFile[i], &GFXStaticTextureSRGBProfile, avar("%s() - mCubeFace[%d] (line %d)", __FUNCTION__, i, __LINE__)))
|
||||
{
|
||||
Con::errorf("CubemapData::createMap - Failed to load texture '%s'", mCubeFaceFile[i].c_str());
|
||||
initSuccess = false;
|
||||
|
|
@ -145,7 +146,7 @@ void CubemapData::updateFaces()
|
|||
{
|
||||
if (!mCubeFaceFile[i].isEmpty())
|
||||
{
|
||||
if (!mCubeFace[i].set(mCubeFaceFile[i], &GFXStaticTextureProfile, avar("%s() - mCubeFace[%d] (line %d)", __FUNCTION__, i, __LINE__)))
|
||||
if (!mCubeFace[i].set(mCubeFaceFile[i], &GFXStaticTextureSRGBProfile, avar("%s() - mCubeFace[%d] (line %d)", __FUNCTION__, i, __LINE__)))
|
||||
{
|
||||
initSuccess = false;
|
||||
Con::errorf("CubemapData::createMap - Failed to load texture '%s'", mCubeFaceFile[i].c_str());
|
||||
|
|
@ -163,6 +164,11 @@ void CubemapData::updateFaces()
|
|||
}
|
||||
}
|
||||
|
||||
void CubemapData::setCubemapFile(FileName newCubemapFile)
|
||||
{
|
||||
mCubeMapFile = newCubemapFile;
|
||||
}
|
||||
|
||||
void CubemapData::setCubeFaceFile(U32 index, FileName newFaceFile)
|
||||
{
|
||||
if (index >= 6)
|
||||
|
|
@ -171,6 +177,14 @@ void CubemapData::setCubeFaceFile(U32 index, FileName newFaceFile)
|
|||
mCubeFaceFile[index] = newFaceFile;
|
||||
}
|
||||
|
||||
void CubemapData::setCubeFaceTexture(U32 index, GFXTexHandle newFaceTexture)
|
||||
{
|
||||
if (index >= 6)
|
||||
return;
|
||||
|
||||
mCubeFace[index] = newFaceTexture;
|
||||
}
|
||||
|
||||
DefineEngineMethod( CubemapData, updateFaces, void, (),,
|
||||
"Update the assigned cubemaps faces." )
|
||||
{
|
||||
|
|
@ -183,3 +197,18 @@ DefineEngineMethod( CubemapData, getFilename, const char*, (),,
|
|||
{
|
||||
return object->getFilename();
|
||||
}
|
||||
|
||||
DefineEngineMethod(CubemapData, save, void, (const char* filename, const GFXFormat format), ("", GFXFormatBC1),
|
||||
"Returns the script filename of where the CubemapData object was "
|
||||
"defined. This is used by the material editor.")
|
||||
{
|
||||
if (filename == "")
|
||||
filename = object->getName();
|
||||
|
||||
//add dds extension if needed
|
||||
String finalName = String(filename);
|
||||
if(!finalName.endsWith(".dds") || !finalName.endsWith(".DDS"))
|
||||
finalName += String(".dds");
|
||||
|
||||
CubemapSaver::save(object->mCubemap, finalName, format);
|
||||
}
|
||||
|
|
@ -63,7 +63,12 @@ public:
|
|||
// Update a static cubemap @ pos
|
||||
void updateFaces();
|
||||
|
||||
void setCubemapFile(FileName newCubemapFile);
|
||||
|
||||
void setCubeFaceFile(U32 index, FileName newFaceFile);
|
||||
|
||||
void setCubeFaceTexture(U32 index, GFXTexHandle newFaceTexture);
|
||||
|
||||
GFXTexHandle* getCubeMapFace(U32 faceIdx) { return &mCubeFace[faceIdx]; }
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -132,9 +132,9 @@ namespace
|
|||
desc.setCullMode(GFXCullNone);
|
||||
desc.setZReadWrite(false);
|
||||
desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha);
|
||||
GFX->setStateBlockByDesc( desc );
|
||||
|
||||
GFX->setupGenericShaders();
|
||||
GFX->setStateBlockByDesc( desc );
|
||||
GFX->drawPrimitive( GFXTriangleStrip, 0, 2 );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1830,7 +1830,7 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
|
|||
if (GuiOffscreenCanvas::sList.size() != 0)
|
||||
{
|
||||
// Reset the entire state since oculus shit will have barfed it.
|
||||
//GFX->disableShaders(true);
|
||||
|
||||
GFX->updateStates(true);
|
||||
|
||||
for (Vector<GuiOffscreenCanvas*>::iterator itr = GuiOffscreenCanvas::sList.begin(); itr != GuiOffscreenCanvas::sList.end(); itr++)
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ void MEDeleteUndoAction::deleteObject( SimObject *object )
|
|||
if ( group )
|
||||
state.groupId = group->getId();
|
||||
|
||||
//Do any special handling of delete actions the object may do
|
||||
object->handleDeleteAction();
|
||||
|
||||
// Now delete the object.
|
||||
object->deleteObject();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,10 @@
|
|||
#include "gfx/gfxDebugEvent.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
|
||||
const RenderInstType AdvancedLightBinManager::RIT_LightInfo( "LightInfo" );
|
||||
const String AdvancedLightBinManager::smBufferName( "lightinfo" );
|
||||
const RenderInstType AdvancedLightBinManager::RIT_LightInfo( "specularLighting" );
|
||||
const String AdvancedLightBinManager::smBufferName( "specularLighting" );
|
||||
|
||||
ShadowFilterMode AdvancedLightBinManager::smShadowFilterMode = ShadowFilterMode_SoftShadowHighQuality;
|
||||
bool AdvancedLightBinManager::smPSSMDebugRender = false;
|
||||
|
|
@ -115,22 +116,12 @@ ConsoleDocClass( AdvancedLightBinManager,
|
|||
AdvancedLightBinManager::AdvancedLightBinManager( AdvancedLightManager *lm /* = NULL */,
|
||||
ShadowMapManager *sm /* = NULL */,
|
||||
GFXFormat lightBufferFormat /* = GFXFormatR8G8B8A8 */ )
|
||||
: RenderTexTargetBinManager( RIT_LightInfo, 1.0f, 1.0f, lightBufferFormat ),
|
||||
: RenderBinManager( RIT_LightInfo, 1.0f, 1.0f ),
|
||||
mNumLightsCulled(0),
|
||||
mLightManager(lm),
|
||||
mShadowManager(sm),
|
||||
mConditioner(NULL)
|
||||
mShadowManager(sm)
|
||||
{
|
||||
// Create an RGB conditioner
|
||||
mConditioner = new AdvancedLightBufferConditioner( getTargetFormat(),
|
||||
AdvancedLightBufferConditioner::RGB );
|
||||
mNamedTarget.setConditioner( mConditioner );
|
||||
mNamedTarget.registerWithName( smBufferName );
|
||||
|
||||
// We want a full-resolution buffer
|
||||
mTargetSizeType = RenderTexTargetBinManager::WindowSize;
|
||||
|
||||
mMRTLightmapsDuringDeferred = false;
|
||||
mMRTLightmapsDuringDeferred = true;
|
||||
|
||||
Con::NotifyDelegate callback( this, &AdvancedLightBinManager::_deleteLightMaterials );
|
||||
Con::addVariableNotify( "$pref::Shadows::filterMode", callback );
|
||||
|
|
@ -143,8 +134,6 @@ AdvancedLightBinManager::~AdvancedLightBinManager()
|
|||
{
|
||||
_deleteLightMaterials();
|
||||
|
||||
SAFE_DELETE(mConditioner);
|
||||
|
||||
Con::NotifyDelegate callback( this, &AdvancedLightBinManager::_deleteLightMaterials );
|
||||
Con::removeVariableNotify( "$pref::shadows::filterMode", callback );
|
||||
Con::removeVariableNotify( "$AL::PSSMDebugRender", callback );
|
||||
|
|
@ -172,12 +161,34 @@ void AdvancedLightBinManager::consoleInit()
|
|||
|
||||
bool AdvancedLightBinManager::setTargetSize(const Point2I &newTargetSize)
|
||||
{
|
||||
bool ret = Parent::setTargetSize( newTargetSize );
|
||||
/*bool ret = Parent::setTargetSize( newTargetSize );
|
||||
|
||||
// We require the viewport to match the default.
|
||||
mNamedTarget.setViewport( GFX->getViewport() );
|
||||
|
||||
return ret;
|
||||
return ret;*/
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AdvancedLightBinManager::_updateTargets()
|
||||
{
|
||||
/* PROFILE_SCOPE(AdvancedLightBinManager_updateTargets);
|
||||
|
||||
bool ret = Parent::_updateTargets();
|
||||
|
||||
mDiffuseLightingTarget = NamedTexTarget::find("diffuseLighting");
|
||||
if (mDiffuseLightingTarget.isValid())
|
||||
{
|
||||
mDiffuseLightingTex = mDiffuseLightingTarget->getTexture();
|
||||
|
||||
for (U32 i = 0; i < mTargetChainLength; i++)
|
||||
mTargetChain[i]->attachTexture(GFXTextureTarget::Color1, mDiffuseLightingTex);
|
||||
}
|
||||
|
||||
GFX->finalizeReset();
|
||||
|
||||
return ret;*/
|
||||
return true;
|
||||
}
|
||||
|
||||
void AdvancedLightBinManager::addLight( LightInfo *light )
|
||||
|
|
@ -249,19 +260,32 @@ void AdvancedLightBinManager::render( SceneRenderState *state )
|
|||
GFXDEBUGEVENT_SCOPE( AdvancedLightBinManager_Render, ColorI::RED );
|
||||
|
||||
// Tell the superclass we're about to render
|
||||
if ( !_onPreRender( state ) )
|
||||
//if ( !_onPreRender( state ) )
|
||||
// return;
|
||||
|
||||
NamedTexTargetRef sceneColorTargetRef = NamedTexTarget::find("AL_FormatToken");
|
||||
if (sceneColorTargetRef.isNull())
|
||||
return;
|
||||
|
||||
// Clear as long as there isn't MRT population of light buffer with lightmap data
|
||||
if ( !MRTLightmapsDuringDeferred() )
|
||||
GFX->clear(GFXClearTarget, ColorI(0, 0, 0, 0), 1.0f, 0);
|
||||
GFXTextureTargetRef lightingTargetRef = GFX->allocRenderToTextureTarget();
|
||||
|
||||
if (lightingTargetRef.isNull())
|
||||
return;
|
||||
|
||||
//Do a quick pass to update our probes if they're dirty
|
||||
//PROBEMGR->updateDirtyProbes();
|
||||
|
||||
lightingTargetRef->attachTexture(GFXTextureTarget::Color0, sceneColorTargetRef->getTexture());
|
||||
|
||||
GFX->pushActiveRenderTarget();
|
||||
GFX->setActiveRenderTarget(lightingTargetRef);
|
||||
|
||||
GFX->setViewport(sceneColorTargetRef->getViewport());
|
||||
|
||||
// Restore transforms
|
||||
MatrixSet &matrixSet = getRenderPass()->getMatrixSet();
|
||||
matrixSet.restoreSceneViewProjection();
|
||||
|
||||
const MatrixF &worldToCameraXfm = matrixSet.getWorldToCamera();
|
||||
|
||||
// Set up the SG Data
|
||||
SceneData sgData;
|
||||
sgData.init( state );
|
||||
|
|
@ -291,7 +315,7 @@ void AdvancedLightBinManager::render( SceneRenderState *state )
|
|||
|
||||
// Set up SG data
|
||||
setupSGData( sgData, state, sunLight );
|
||||
vectorMatInfo->setLightParameters( sunLight, state, worldToCameraXfm );
|
||||
vectorMatInfo->setLightParameters( sunLight, state );
|
||||
|
||||
// Set light holds the active shadow map.
|
||||
mShadowManager->setLightShadowMapForLight( sunLight );
|
||||
|
|
@ -329,7 +353,7 @@ void AdvancedLightBinManager::render( SceneRenderState *state )
|
|||
GFXDEBUGEVENT_SCOPE( AdvancedLightBinManager_Render_Light, ColorI::RED );
|
||||
|
||||
setupSGData( sgData, state, curLightInfo );
|
||||
curLightMat->setLightParameters( curLightInfo, state, worldToCameraXfm );
|
||||
curLightMat->setLightParameters( curLightInfo, state );
|
||||
mShadowManager->setLightShadowMap( curEntry.shadowMap );
|
||||
mShadowManager->setLightDynamicShadowMap( curEntry.dynamicShadowMap );
|
||||
|
||||
|
|
@ -368,7 +392,8 @@ void AdvancedLightBinManager::render( SceneRenderState *state )
|
|||
getRenderSignal().trigger(state, this);
|
||||
|
||||
// Finish up the rendering
|
||||
_onPostRender();
|
||||
//_onPostRender();
|
||||
GFX->popActiveRenderTarget();
|
||||
}
|
||||
|
||||
AdvancedLightBinManager::LightMaterialInfo* AdvancedLightBinManager::_getLightMaterial( LightInfo::Type lightType,
|
||||
|
|
@ -501,17 +526,6 @@ void AdvancedLightBinManager::_setupPerFrameParameters( const SceneRenderState *
|
|||
farPlane,
|
||||
vsFarPlane);
|
||||
}
|
||||
|
||||
MatrixSet &matrixSet = getRenderPass()->getMatrixSet();
|
||||
//matrixSet.restoreSceneViewProjection();
|
||||
|
||||
const MatrixF &worldToCameraXfm = matrixSet.getWorldToCamera();
|
||||
|
||||
MatrixF inverseViewMatrix = worldToCameraXfm;
|
||||
//inverseViewMatrix.fullInverse();
|
||||
//inverseViewMatrix.transpose();
|
||||
|
||||
//MatrixF inverseViewMatrix = MatrixF::Identity;
|
||||
}
|
||||
|
||||
void AdvancedLightBinManager::setupSGData( SceneData &data, const SceneRenderState* state, LightInfo *light )
|
||||
|
|
@ -596,10 +610,9 @@ AdvancedLightBinManager::LightMaterialInfo::LightMaterialInfo( const String &mat
|
|||
lightPosition(NULL),
|
||||
lightDirection(NULL),
|
||||
lightColor(NULL),
|
||||
lightAttenuation(NULL),
|
||||
lightRange(NULL),
|
||||
lightAmbient(NULL),
|
||||
lightTrilight(NULL),
|
||||
lightRange(NULL),
|
||||
lightInvSqrRange(NULL),
|
||||
lightAmbient(NULL),
|
||||
lightSpotParams(NULL)
|
||||
{
|
||||
Material *mat = MATMGR->getMaterialDefinitionByName( matName );
|
||||
|
|
@ -615,10 +628,9 @@ AdvancedLightBinManager::LightMaterialInfo::LightMaterialInfo( const String &mat
|
|||
|
||||
lightDirection = matInstance->getMaterialParameterHandle("$lightDirection");
|
||||
lightAmbient = matInstance->getMaterialParameterHandle("$lightAmbient");
|
||||
lightTrilight = matInstance->getMaterialParameterHandle("$lightTrilight");
|
||||
lightSpotParams = matInstance->getMaterialParameterHandle("$lightSpotParams");
|
||||
lightAttenuation = matInstance->getMaterialParameterHandle("$lightAttenuation");
|
||||
lightRange = matInstance->getMaterialParameterHandle("$lightRange");
|
||||
lightInvSqrRange = matInstance->getMaterialParameterHandle("$lightInvSqrRange");
|
||||
lightPosition = matInstance->getMaterialParameterHandle("$lightPosition");
|
||||
farPlane = matInstance->getMaterialParameterHandle("$farPlane");
|
||||
vsFarPlane = matInstance->getMaterialParameterHandle("$vsFarPlane");
|
||||
|
|
@ -655,99 +667,51 @@ void AdvancedLightBinManager::LightMaterialInfo::setViewParameters( const F32 _
|
|||
matParams->setSafe( zNearFarInvNearFar, Point4F( _zNear, _zFar, 1.0f / _zNear, 1.0f / _zFar ) );
|
||||
}
|
||||
|
||||
void AdvancedLightBinManager::LightMaterialInfo::setLightParameters( const LightInfo *lightInfo, const SceneRenderState* renderState, const MatrixF &worldViewOnly )
|
||||
void AdvancedLightBinManager::LightMaterialInfo::setLightParameters( const LightInfo *lightInfo, const SceneRenderState* renderState )
|
||||
{
|
||||
MaterialParameters *matParams = matInstance->getMaterialParameters();
|
||||
|
||||
// Set color in the right format, set alpha to the luminance value for the color.
|
||||
LinearColorF col = lightInfo->getColor();
|
||||
|
||||
// TODO: The specularity control of the light
|
||||
// is being scaled by the overall lumiance.
|
||||
//
|
||||
// Not sure if this may be the source of our
|
||||
// bad specularity results maybe?
|
||||
//
|
||||
|
||||
const Point3F colorToLumiance( 0.3576f, 0.7152f, 0.1192f );
|
||||
F32 lumiance = mDot(*((const Point3F *)&lightInfo->getColor()), colorToLumiance );
|
||||
col.alpha *= lumiance;
|
||||
|
||||
matParams->setSafe( lightColor, col );
|
||||
matParams->setSafe( lightColor, lightInfo->getColor() );
|
||||
matParams->setSafe( lightBrightness, lightInfo->getBrightness() );
|
||||
|
||||
switch( lightInfo->getType() )
|
||||
{
|
||||
case LightInfo::Vector:
|
||||
{
|
||||
VectorF lightDir = lightInfo->getDirection();
|
||||
worldViewOnly.mulV(lightDir);
|
||||
lightDir.normalize();
|
||||
matParams->setSafe( lightDirection, lightDir );
|
||||
|
||||
// Set small number for alpha since it represents existing specular in
|
||||
// the vector light. This prevents a divide by zero.
|
||||
LinearColorF ambientColor = renderState->getAmbientLightColor();
|
||||
ambientColor.alpha = 0.00001f;
|
||||
matParams->setSafe( lightAmbient, ambientColor );
|
||||
|
||||
// If no alt color is specified, set it to the average of
|
||||
// the ambient and main color to avoid artifacts.
|
||||
//
|
||||
// TODO: Trilight disabled until we properly implement it
|
||||
// in the light info!
|
||||
//
|
||||
//LinearColorF lightAlt = lightInfo->getAltColor();
|
||||
LinearColorF lightAlt( LinearColorF::BLACK ); // = lightInfo->getAltColor();
|
||||
if ( lightAlt.red == 0.0f && lightAlt.green == 0.0f && lightAlt.blue == 0.0f )
|
||||
lightAlt = (lightInfo->getColor() + renderState->getAmbientLightColor()) / 2.0f;
|
||||
|
||||
LinearColorF trilightColor = lightAlt;
|
||||
matParams->setSafe(lightTrilight, trilightColor);
|
||||
matParams->setSafe( lightDirection, lightInfo->getDirection());
|
||||
matParams->setSafe( lightAmbient, renderState->getAmbientLightColor());
|
||||
}
|
||||
break;
|
||||
|
||||
case LightInfo::Spot:
|
||||
{
|
||||
const F32 outerCone = lightInfo->getOuterConeAngle();
|
||||
const F32 innerCone = getMin( lightInfo->getInnerConeAngle(), outerCone );
|
||||
const F32 outerCos = mCos( mDegToRad( outerCone / 2.0f ) );
|
||||
const F32 innerCos = mCos( mDegToRad( innerCone / 2.0f ) );
|
||||
Point4F spotParams( outerCos,
|
||||
innerCos - outerCos,
|
||||
mCos( mDegToRad( outerCone ) ),
|
||||
0.0f );
|
||||
const F32 innerCone = getMin(lightInfo->getInnerConeAngle(), outerCone);
|
||||
const F32 outerCos = mCos(mDegToRad(outerCone / 2.0f));
|
||||
const F32 innerCos = mCos(mDegToRad(innerCone / 2.0f));
|
||||
Point2F spotParams(outerCos,innerCos - outerCos);
|
||||
|
||||
matParams->setSafe( lightSpotParams, spotParams );
|
||||
matParams->setSafe( lightDirection, lightInfo->getDirection());
|
||||
matParams->setSafe( lightPosition, lightInfo->getPosition());
|
||||
|
||||
VectorF lightDir = lightInfo->getDirection();
|
||||
worldViewOnly.mulV(lightDir);
|
||||
lightDir.normalize();
|
||||
matParams->setSafe( lightDirection, lightDir );
|
||||
const F32 radius = lightInfo->getRange().x;
|
||||
const F32 invSqrRadius = 1.0f / mSquared(radius);
|
||||
matParams->setSafe(lightRange, radius);
|
||||
matParams->setSafe(lightInvSqrRange, invSqrRadius);
|
||||
}
|
||||
// Fall through
|
||||
break;
|
||||
|
||||
case LightInfo::Point:
|
||||
{
|
||||
const F32 radius = lightInfo->getRange().x;
|
||||
matParams->setSafe( lightRange, radius );
|
||||
{
|
||||
matParams->setSafe(lightPosition, lightInfo->getPosition());
|
||||
|
||||
Point3F lightPos;
|
||||
worldViewOnly.mulP(lightInfo->getPosition(), &lightPos);
|
||||
matParams->setSafe( lightPosition, lightPos );
|
||||
|
||||
// Get the attenuation falloff ratio and normalize it.
|
||||
Point3F attenRatio = lightInfo->getExtended<ShadowMapParams>()->attenuationRatio;
|
||||
F32 total = attenRatio.x + attenRatio.y + attenRatio.z;
|
||||
if ( total > 0.0f )
|
||||
attenRatio /= total;
|
||||
|
||||
Point2F attenParams( ( 1.0f / radius ) * attenRatio.y,
|
||||
( 1.0f / ( radius * radius ) ) * attenRatio.z );
|
||||
|
||||
matParams->setSafe( lightAttenuation, attenParams );
|
||||
const F32 radius = lightInfo->getRange().x;
|
||||
const F32 invSqrRadius = 1.0f / (radius * radius);
|
||||
matParams->setSafe( lightRange, radius);
|
||||
matParams->setSafe( lightInvSqrRange, invSqrRadius);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
AssertFatal( false, "Bad light type!" );
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ public:
|
|||
bool mSpecialLight;
|
||||
};
|
||||
|
||||
class AdvancedLightBinManager : public RenderTexTargetBinManager
|
||||
class AdvancedLightBinManager : public RenderBinManager
|
||||
{
|
||||
typedef RenderTexTargetBinManager Parent;
|
||||
typedef RenderBinManager Parent;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -90,6 +90,9 @@ public:
|
|||
// registered buffer name
|
||||
static const String smBufferName;
|
||||
|
||||
NamedTexTargetRef mDiffuseLightingTarget;
|
||||
GFXTexHandle mDiffuseLightingTex;
|
||||
|
||||
/// The shadow filter mode to use on shadowed light materials.
|
||||
static ShadowFilterMode smShadowFilterMode;
|
||||
|
||||
|
|
@ -128,6 +131,7 @@ public:
|
|||
bool MRTLightmapsDuringDeferred() const { return mMRTLightmapsDuringDeferred; }
|
||||
void MRTLightmapsDuringDeferred(bool val);
|
||||
|
||||
bool _updateTargets();
|
||||
|
||||
typedef Signal<void(SceneRenderState *, AdvancedLightBinManager *)> RenderSignal;
|
||||
static RenderSignal &getRenderSignal();
|
||||
|
|
@ -161,10 +165,9 @@ protected:
|
|||
MaterialParameterHandle *lightDirection;
|
||||
MaterialParameterHandle *lightColor;
|
||||
MaterialParameterHandle *lightBrightness;
|
||||
MaterialParameterHandle *lightAttenuation;
|
||||
MaterialParameterHandle *lightRange;
|
||||
MaterialParameterHandle *lightInvSqrRange;
|
||||
MaterialParameterHandle *lightAmbient;
|
||||
MaterialParameterHandle *lightTrilight;
|
||||
MaterialParameterHandle *lightSpotParams;
|
||||
|
||||
LightMaterialInfo( const String &matName,
|
||||
|
|
@ -180,7 +183,7 @@ protected:
|
|||
const PlaneF &farPlane,
|
||||
const PlaneF &_vsFarPlane );
|
||||
|
||||
void setLightParameters( const LightInfo *light, const SceneRenderState* renderState, const MatrixF &worldViewOnly );
|
||||
void setLightParameters( const LightInfo *light, const SceneRenderState* renderState );
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
@ -226,8 +229,6 @@ protected:
|
|||
///
|
||||
void _onShadowFilterChanged();
|
||||
|
||||
AdvancedLightBufferConditioner *mConditioner;
|
||||
|
||||
typedef GFXVertexPNTT FarFrustumQuadVert;
|
||||
GFXVertexBufferHandle<FarFrustumQuadVert> mFarFrustumQuadVerts;
|
||||
|
||||
|
|
|
|||
|
|
@ -115,22 +115,22 @@ void AdvancedLightManager::activate( SceneManager *sceneManager )
|
|||
true,
|
||||
false );
|
||||
|
||||
mLightBinManager = new AdvancedLightBinManager( this, SHADOWMGR, blendTargetFormat );
|
||||
mLightBinManager->assignName( "AL_LightBinMgr" );
|
||||
|
||||
// First look for the deferred bin...
|
||||
RenderDeferredMgr *deferredBin = _findDeferredRenderBin();
|
||||
|
||||
// If we didn't find the deferred bin then add one.
|
||||
if ( !deferredBin )
|
||||
if (!deferredBin)
|
||||
{
|
||||
deferredBin = new RenderDeferredMgr( true, blendTargetFormat );
|
||||
deferredBin->assignName( "AL_DeferredBin" );
|
||||
deferredBin = new RenderDeferredMgr(true, blendTargetFormat);
|
||||
deferredBin->assignName("AL_DeferredBin");
|
||||
deferredBin->registerObject();
|
||||
getSceneManager()->getDefaultRenderPass()->addManager( deferredBin );
|
||||
getSceneManager()->getDefaultRenderPass()->addManager(deferredBin);
|
||||
mDeferredRenderBin = deferredBin;
|
||||
}
|
||||
|
||||
mLightBinManager = new AdvancedLightBinManager( this, SHADOWMGR, blendTargetFormat );
|
||||
mLightBinManager->assignName( "AL_LightBinMgr" );
|
||||
|
||||
// Tell the material manager that deferred is enabled.
|
||||
MATMGR->setDeferredEnabled( true );
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ void AdvancedLightManager::activate( SceneManager *sceneManager )
|
|||
mLightBinManager->setRenderOrder( deferredBin->getRenderOrder() + 0.01f );
|
||||
getSceneManager()->getDefaultRenderPass()->addManager( mLightBinManager );
|
||||
|
||||
AdvancedLightingFeatures::registerFeatures(mDeferredRenderBin->getTargetFormat(), mLightBinManager->getTargetFormat());
|
||||
AdvancedLightingFeatures::registerFeatures(mDeferredRenderBin->getTargetFormat(), blendTargetFormat);
|
||||
|
||||
// Last thing... let everyone know we're active.
|
||||
smActivateSignal.trigger( getId(), true );
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ void AdvancedLightingFeatures::registerFeatures( const GFXFormat &deferredTarget
|
|||
FEATUREMGR->registerFeature(MFT_DeferredConditioner, cond);
|
||||
FEATUREMGR->registerFeature(MFT_RTLighting, new DeferredRTLightingFeatGLSL());
|
||||
FEATUREMGR->registerFeature(MFT_NormalMap, new DeferredBumpFeatGLSL());
|
||||
FEATUREMGR->registerFeature(MFT_PixSpecular, new DeferredPixelSpecularGLSL());
|
||||
FEATUREMGR->registerFeature(MFT_MinnaertShading, new DeferredMinnaertGLSL());
|
||||
FEATUREMGR->registerFeature(MFT_SubSurface, new DeferredSubSurfaceGLSL());
|
||||
FEATUREMGR->registerFeature(MFT_ReflectionProbes, new ReflectionProbeFeatGLSL);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
|
@ -72,9 +72,9 @@ void AdvancedLightingFeatures::registerFeatures( const GFXFormat &deferredTarget
|
|||
FEATUREMGR->registerFeature(MFT_DeferredConditioner, cond);
|
||||
FEATUREMGR->registerFeature(MFT_RTLighting, new DeferredRTLightingFeatHLSL());
|
||||
FEATUREMGR->registerFeature(MFT_NormalMap, new DeferredBumpFeatHLSL());
|
||||
FEATUREMGR->registerFeature(MFT_PixSpecular, new DeferredPixelSpecularHLSL());
|
||||
FEATUREMGR->registerFeature(MFT_MinnaertShading, new DeferredMinnaertHLSL());
|
||||
FEATUREMGR->registerFeature(MFT_SubSurface, new DeferredSubSurfaceHLSL());
|
||||
FEATUREMGR->registerFeature(MFT_ReflectionProbes, new ReflectionProbeFeatHLSL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,6 @@ void AdvancedLightingFeatures::unregisterFeatures()
|
|||
FEATUREMGR->unregisterFeature(MFT_DeferredConditioner);
|
||||
FEATUREMGR->unregisterFeature(MFT_RTLighting);
|
||||
FEATUREMGR->unregisterFeature(MFT_NormalMap);
|
||||
FEATUREMGR->unregisterFeature(MFT_PixSpecular);
|
||||
FEATUREMGR->unregisterFeature(MFT_MinnaertShading);
|
||||
FEATUREMGR->unregisterFeature(MFT_SubSurface);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ void DeferredRTLightingFeatGLSL::processPixMacros( Vector<GFXShaderMacro> ¯o
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::processPixMacros( macros, fd );
|
||||
return;
|
||||
|
|
@ -56,7 +56,7 @@ void DeferredRTLightingFeatGLSL::processVert( Vector<ShaderComponent*> &compon
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::processVert( componentList, fd );
|
||||
return;
|
||||
|
|
@ -79,7 +79,7 @@ void DeferredRTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &component
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::processPix( componentList, fd );
|
||||
return;
|
||||
|
|
@ -98,7 +98,7 @@ void DeferredRTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &component
|
|||
uvScene->setName( "uvScene" );
|
||||
LangElement *uvSceneDecl = new DecOp( uvScene );
|
||||
|
||||
String rtParamName = String::ToString( "rtParams%s", "lightInfoBuffer" );
|
||||
String rtParamName = String::ToString( "rtParams%s", "diffuseLightingBuffer" );
|
||||
Var *rtParams = (Var*) LangElement::find( rtParamName );
|
||||
if( !rtParams )
|
||||
{
|
||||
|
|
@ -121,7 +121,7 @@ void DeferredRTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &component
|
|||
// create texture var
|
||||
Var *lightInfoBuffer = new Var;
|
||||
lightInfoBuffer->setType( "sampler2D" );
|
||||
lightInfoBuffer->setName( "lightInfoBuffer" );
|
||||
lightInfoBuffer->setName( "diffuseLightingBuffer" );
|
||||
lightInfoBuffer->uniform = true;
|
||||
lightInfoBuffer->sampler = true;
|
||||
lightInfoBuffer->constNum = Var::getTexUnitNum(); // used as texture unit num here
|
||||
|
|
@ -175,7 +175,7 @@ void DeferredRTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &component
|
|||
ShaderFeature::Resources DeferredRTLightingFeatGLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
return Parent::getResources( fd );
|
||||
|
||||
// HACK: See DeferredRTLightingFeatGLSL::setTexData.
|
||||
|
|
@ -193,7 +193,7 @@ void DeferredRTLightingFeatGLSL::setTexData( Material::StageData &stageDat,
|
|||
U32 &texIndex )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::setTexData( stageDat, fd, passData, texIndex );
|
||||
return;
|
||||
|
|
@ -207,7 +207,7 @@ void DeferredRTLightingFeatGLSL::setTexData( Material::StageData &stageDat,
|
|||
mLastTexIndex = texIndex;
|
||||
|
||||
passData.mTexType[ texIndex ] = Material::TexTarget;
|
||||
passData.mSamplerNames[ texIndex ]= "lightInfoBuffer";
|
||||
passData.mSamplerNames[ texIndex ]= "diffuseLightingBuffer";
|
||||
passData.mTexSlot[ texIndex++ ].texTarget = texTarget;
|
||||
}
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ void DeferredBumpFeatGLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
|
||||
const bool useTexAnim = fd.features[MFT_TexAnim];
|
||||
// Make sure there are texcoords
|
||||
if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] )
|
||||
if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap])
|
||||
{
|
||||
|
||||
getOutTexCoord( "texCoord",
|
||||
|
|
@ -245,7 +245,7 @@ void DeferredBumpFeatGLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
output = meta;
|
||||
}
|
||||
else if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processVert( componentList, fd );
|
||||
|
|
@ -382,13 +382,13 @@ void DeferredBumpFeatGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
}
|
||||
}
|
||||
else if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processPix( componentList, fd );
|
||||
return;
|
||||
}
|
||||
else if ( fd.features[MFT_PixSpecular] && !fd.features[MFT_SpecularMap] )
|
||||
else if (!fd.features[MFT_SpecularMap] )
|
||||
{
|
||||
Var *bumpSample = (Var *)LangElement::find( "bumpSample" );
|
||||
if( bumpSample == NULL )
|
||||
|
|
@ -413,7 +413,7 @@ void DeferredBumpFeatGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
ShaderFeature::Resources DeferredBumpFeatGLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
fd.features[MFT_Parallax] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
return Parent::getResources( fd );
|
||||
|
|
@ -442,7 +442,7 @@ void DeferredBumpFeatGLSL::setTexData( Material::StageData &stageDat,
|
|||
U32 &texIndex )
|
||||
{
|
||||
if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::setTexData( stageDat, fd, passData, texIndex );
|
||||
|
|
@ -463,8 +463,7 @@ void DeferredBumpFeatGLSL::setTexData( Material::StageData &stageDat,
|
|||
}
|
||||
}
|
||||
else if (!fd.features[MFT_Parallax] && !fd.features[MFT_SpecularMap] &&
|
||||
( fd.features[MFT_DeferredConditioner] ||
|
||||
fd.features[MFT_PixSpecular] ) )
|
||||
( fd.features[MFT_DeferredConditioner]) )
|
||||
{
|
||||
passData.mTexType[ texIndex ] = Material::Bump;
|
||||
passData.mSamplerNames[ texIndex ] = "bumpMap";
|
||||
|
|
@ -481,114 +480,10 @@ void DeferredBumpFeatGLSL::setTexData( Material::StageData &stageDat,
|
|||
}
|
||||
|
||||
|
||||
void DeferredPixelSpecularGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processVert( componentList, fd );
|
||||
return;
|
||||
}
|
||||
output = NULL;
|
||||
}
|
||||
|
||||
void DeferredPixelSpecularGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processPix( componentList, fd );
|
||||
return;
|
||||
}
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
Var *specular = new Var;
|
||||
specular->setType( "float" );
|
||||
specular->setName( "specular" );
|
||||
LangElement * specDecl = new DecOp( specular );
|
||||
|
||||
Var *specCol = (Var*)LangElement::find( "specularColor" );
|
||||
if(specCol == NULL)
|
||||
{
|
||||
specCol = new Var;
|
||||
specCol->setType( "vec4" );
|
||||
specCol->setName( "specularColor" );
|
||||
specCol->uniform = true;
|
||||
specCol->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
Var *specPow = new Var;
|
||||
specPow->setType( "float" );
|
||||
specPow->setName( "specularPower" );
|
||||
|
||||
// If the gloss map flag is set, than the specular power is in the alpha
|
||||
// channel of the specular map
|
||||
if( fd.features[ MFT_GlossMap ] )
|
||||
meta->addStatement( new GenOp( " @ = @.a * 255;\r\n", new DecOp( specPow ), specCol ) );
|
||||
else
|
||||
{
|
||||
specPow->uniform = true;
|
||||
specPow->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
Var *specStrength = (Var*)LangElement::find( "specularStrength" );
|
||||
if (!specStrength)
|
||||
{
|
||||
specStrength = new Var( "specularStrength", "float" );
|
||||
specStrength->uniform = true;
|
||||
specStrength->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
Var *lightInfoSamp = (Var *)LangElement::find( "lightInfoSample" );
|
||||
Var *d_specular = (Var*)LangElement::find( "d_specular" );
|
||||
Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
|
||||
|
||||
AssertFatal( lightInfoSamp && d_specular && d_NL_Att,
|
||||
"DeferredPixelSpecularGLSL::processPix - Something hosed the deferred features!" );
|
||||
|
||||
if (fd.features[MFT_AccuMap]) {
|
||||
// change specularity where the accu texture is applied
|
||||
Var *accuPlc = (Var*)LangElement::find("plc");
|
||||
Var *accuSpecular = (Var*)LangElement::find("accuSpecular");
|
||||
if (accuPlc != NULL && accuSpecular != NULL)
|
||||
//d_specular = clamp(lerp( d_specular, accuSpecular * d_specular, plc.a), 0, 1)
|
||||
meta->addStatement(new GenOp(" @ = clamp( lerp( @, @ * @, @.a), 0, 1);\r\n", d_specular, d_specular, accuSpecular, d_specular, accuPlc));
|
||||
}
|
||||
// (a^m)^n = a^(m*n)
|
||||
meta->addStatement( new GenOp( " @ = pow( abs(@), max((@ / AL_ConstantSpecularPower),1.0f)) * @;\r\n",
|
||||
specDecl, d_specular, specPow, specStrength ) );
|
||||
|
||||
LangElement *specMul = new GenOp( "vec4( @.rgb, 0 ) * @", specCol, specular );
|
||||
LangElement *final = specMul;
|
||||
|
||||
// We we have a normal map then mask the specular
|
||||
if( !fd.features[MFT_SpecularMap] && fd.features[MFT_NormalMap] )
|
||||
{
|
||||
Var *bumpSample = (Var*)LangElement::find( "bumpSample" );
|
||||
final = new GenOp( "@ * @.a", final, bumpSample );
|
||||
}
|
||||
|
||||
// add to color
|
||||
meta->addStatement( new GenOp( " @;\r\n", assignColor( final, Material::Add ) ) );
|
||||
|
||||
output = meta;
|
||||
}
|
||||
|
||||
ShaderFeature::Resources DeferredPixelSpecularGLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
return Parent::getResources( fd );
|
||||
|
||||
Resources res;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
ShaderFeature::Resources DeferredMinnaertGLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
Resources res;
|
||||
if( !fd.features[MFT_ForwardShading] && fd.features[MFT_RTLighting] )
|
||||
if( fd.features[MFT_isDeferred] && fd.features[MFT_RTLighting] )
|
||||
{
|
||||
res.numTex = 1;
|
||||
res.numTexReg = 1;
|
||||
|
|
@ -601,7 +496,7 @@ void DeferredMinnaertGLSL::setTexData( Material::StageData &stageDat,
|
|||
RenderPassData &passData,
|
||||
U32 &texIndex )
|
||||
{
|
||||
if( !fd.features[MFT_ForwardShading] && fd.features[MFT_RTLighting] )
|
||||
if( fd.features[MFT_isDeferred] && fd.features[MFT_RTLighting] )
|
||||
{
|
||||
NamedTexTarget *texTarget = NamedTexTarget::find(RenderDeferredMgr::BufferName);
|
||||
if ( texTarget )
|
||||
|
|
@ -616,7 +511,7 @@ void DeferredMinnaertGLSL::setTexData( Material::StageData &stageDat,
|
|||
void DeferredMinnaertGLSL::processPixMacros( Vector<GFXShaderMacro> ¯os,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if( !fd.features[MFT_ForwardShading] && fd.features[MFT_RTLighting] )
|
||||
if( fd.features[MFT_isDeferred] && fd.features[MFT_RTLighting] )
|
||||
{
|
||||
// Pull in the uncondition method for the g buffer
|
||||
NamedTexTarget *texTarget = NamedTexTarget::find( RenderDeferredMgr::BufferName );
|
||||
|
|
@ -633,7 +528,7 @@ void DeferredMinnaertGLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// If there is no deferred information, bail on this feature
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
if( !fd.features[MFT_isDeferred] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
output = NULL;
|
||||
return;
|
||||
|
|
@ -650,7 +545,7 @@ void DeferredMinnaertGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// If there is no deferred information, bail on this feature
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
if( !fd.features[MFT_isDeferred] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
output = NULL;
|
||||
return;
|
||||
|
|
@ -695,12 +590,6 @@ void DeferredMinnaertGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
void DeferredSubSurfaceGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// If there is no deferred information, bail on this feature
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
output = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
Var *subSurfaceParams = new Var;
|
||||
subSurfaceParams->setType( "vec4" );
|
||||
|
|
@ -712,9 +601,13 @@ void DeferredSubSurfaceGLSL::processPix( Vector<ShaderComponent*> &componentLis
|
|||
Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
meta->addStatement( new GenOp( " float subLamb = smoothstep(-@.a, 1.0, @) - smoothstep(0.0, 1.0, @);\r\n", subSurfaceParams, d_NL_Att, d_NL_Att ) );
|
||||
meta->addStatement( new GenOp( " subLamb = max(0.0, subLamb);\r\n" ) );
|
||||
meta->addStatement( new GenOp( " @;\r\n", assignColor( new GenOp( "vec4(@ + (subLamb * @.rgb), 1.0)", d_lightcolor, subSurfaceParams ), Material::Mul ) ) );
|
||||
if (fd.features[MFT_isDeferred])
|
||||
{
|
||||
Var* targ = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::RenderTarget3));
|
||||
meta->addStatement(new GenOp(" @.rgb += @.rgb*@.a;\r\n", targ, subSurfaceParams, subSurfaceParams));
|
||||
output = meta;
|
||||
return;
|
||||
}
|
||||
|
||||
output = meta;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,29 +101,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
/// Generates specular highlights in the forward pass
|
||||
/// from the light deferred buffer.
|
||||
class DeferredPixelSpecularGLSL : public PixelSpecularGLSL
|
||||
{
|
||||
typedef PixelSpecularGLSL Parent;
|
||||
|
||||
public:
|
||||
virtual void processVert( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd );
|
||||
|
||||
virtual void processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd );
|
||||
|
||||
virtual Resources getResources( const MaterialFeatureData &fd );
|
||||
|
||||
virtual String getName()
|
||||
{
|
||||
return "Pixel Specular [Deferred]";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
class DeferredMinnaertGLSL : public ShaderFeatureGLSL
|
||||
{
|
||||
|
|
@ -167,4 +144,4 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#endif // _DEFERREDFEATURESGLSL_H_
|
||||
#endif // _DEFERREDFEATURESGLSL_H_
|
||||
|
|
|
|||
|
|
@ -62,10 +62,24 @@ void DeferredSpecMapGLSL::processPix( Vector<ShaderComponent*> &componentList, c
|
|||
specularMap->uniform = true;
|
||||
specularMap->sampler = true;
|
||||
specularMap->constNum = Var::getTexUnitNum();
|
||||
//matinfo.g slot reserved for AO later
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
meta->addStatement(new GenOp(" @.b = dot(tex2D(@, @).rgb, vec3(0.3, 0.59, 0.11));\r\n", material, specularMap, texCoord));
|
||||
meta->addStatement(new GenOp(" @.a = tex2D(@, @).a;\r\n", material, specularMap, texCoord));
|
||||
LangElement *texOp = new GenOp( "tex2D(@, @)", specularMap, texCoord );
|
||||
|
||||
Var *pbrConfig = (Var*)LangElement::find("PBRConfig");
|
||||
if (!pbrConfig) pbrConfig = new Var("PBRConfig", "vec4");
|
||||
Var *metalness = (Var*)LangElement::find("metalness");
|
||||
if (!metalness) metalness = new Var("metalness", "float");
|
||||
Var *smoothness = (Var*)LangElement::find("smoothness");
|
||||
if (!smoothness) smoothness = new Var("smoothness", "float");
|
||||
|
||||
meta->addStatement(new GenOp(" @ = @.r;\r\n", new DecOp(smoothness), texOp));
|
||||
meta->addStatement(new GenOp(" @ = @.b;\r\n", new DecOp(metalness), texOp));
|
||||
|
||||
if (fd.features[MFT_InvertSmoothness])
|
||||
meta->addStatement(new GenOp(" @ = 1.0-@;\r\n", smoothness, smoothness));
|
||||
|
||||
meta->addStatement(new GenOp(" @ = @.ggga;\r\n", new DecOp(pbrConfig), texOp));
|
||||
|
||||
meta->addStatement(new GenOp(" @.bga = vec3(@,@.g,@);\r\n", material, smoothness, pbrConfig, metalness));
|
||||
output = meta;
|
||||
}
|
||||
|
||||
|
|
@ -145,44 +159,20 @@ void DeferredSpecVarsGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
material->setName( getOutputTargetVarName(ShaderFeature::RenderTarget2) );
|
||||
material->setStructName("OUT");
|
||||
}
|
||||
|
||||
Var *metalness = new Var("metalness", "float");
|
||||
metalness->uniform = true;
|
||||
metalness->constSortPos = cspPotentialPrimitive;
|
||||
|
||||
Var *specStrength = new Var;
|
||||
specStrength->setType( "float" );
|
||||
specStrength->setName( "specularStrength" );
|
||||
specStrength->uniform = true;
|
||||
specStrength->constSortPos = cspPotentialPrimitive;
|
||||
Var *smoothness = new Var("smoothness", "float");
|
||||
smoothness->uniform = true;
|
||||
smoothness->constSortPos = cspPotentialPrimitive;
|
||||
|
||||
Var *specPower = new Var;
|
||||
specPower->setType("float");
|
||||
specPower->setName("specularPower");
|
||||
specPower->uniform = true;
|
||||
specPower->constSortPos = cspPotentialPrimitive;
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
//matinfo.g slot reserved for AO later
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
meta->addStatement(new GenOp(" @.a = @/128;\r\n", material, specPower));
|
||||
meta->addStatement(new GenOp(" @.b = @/5;\r\n", material, specStrength));
|
||||
output = meta;
|
||||
}
|
||||
|
||||
// Black -> Blue and Alpha of Color Buffer (representing no specular)
|
||||
void DeferredEmptySpecGLSL::processPix( Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd )
|
||||
{
|
||||
// search for material var
|
||||
Var *material = (Var*) LangElement::find( getOutputTargetVarName(ShaderFeature::RenderTarget2) );
|
||||
if ( !material )
|
||||
{
|
||||
// create material var
|
||||
material = new Var;
|
||||
material->setType( "vec4" );
|
||||
material->setName( getOutputTargetVarName(ShaderFeature::RenderTarget2) );
|
||||
material->setStructName("OUT");
|
||||
}
|
||||
|
||||
MultiLine * meta = new MultiLine;
|
||||
//matinfo.g slot reserved for AO later
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
meta->addStatement(new GenOp(" @.ba = vec2(0.0);\r\n", material));
|
||||
MultiLine *meta = new MultiLine;
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
meta->addStatement(new GenOp(" @.b = @;\r\n", material, smoothness));
|
||||
if (fd.features[MFT_InvertSmoothness])
|
||||
meta->addStatement(new GenOp(" @ = 1.0-@;\r\n", smoothness, smoothness));
|
||||
meta->addStatement(new GenOp(" @.a = @;\r\n", material, metalness));
|
||||
output = meta;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,16 +70,4 @@ public:
|
|||
virtual U32 getOutputTargets( const MaterialFeatureData &fd ) const { return ShaderFeature::RenderTarget2; }
|
||||
};
|
||||
|
||||
|
||||
class DeferredEmptySpecGLSL : public ShaderFeatureGLSL
|
||||
{
|
||||
public:
|
||||
virtual String getName() { return "Deferred Shading: Empty Specular"; }
|
||||
|
||||
virtual void processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd );
|
||||
|
||||
virtual U32 getOutputTargets( const MaterialFeatureData &fd ) const { return ShaderFeature::RenderTarget2; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -36,7 +36,7 @@ void DeferredRTLightingFeatHLSL::processPixMacros( Vector<GFXShaderMacro> ¯o
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::processPixMacros( macros, fd );
|
||||
return;
|
||||
|
|
@ -56,7 +56,7 @@ void DeferredRTLightingFeatHLSL::processVert( Vector<ShaderComponent*> &compon
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::processVert( componentList, fd );
|
||||
return;
|
||||
|
|
@ -79,32 +79,33 @@ void DeferredRTLightingFeatHLSL::processPix( Vector<ShaderComponent*> &component
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::processPix( componentList, fd );
|
||||
Parent::processPix(componentList, fd);
|
||||
return;
|
||||
}
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||
Var *ssPos = connectComp->getElement( RT_TEXCOORD );
|
||||
ssPos->setName( "screenspacePos" );
|
||||
ssPos->setStructName( "IN" );
|
||||
ssPos->setType( "float4" );
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>(componentList[C_CONNECTOR]);
|
||||
Var *ssPos = connectComp->getElement(RT_TEXCOORD);
|
||||
ssPos->setName("screenspacePos");
|
||||
ssPos->setStructName("IN");
|
||||
ssPos->setType("float4");
|
||||
|
||||
Var *uvScene = new Var;
|
||||
uvScene->setType( "float2" );
|
||||
uvScene->setName( "uvScene" );
|
||||
LangElement *uvSceneDecl = new DecOp( uvScene );
|
||||
uvScene->setType("float2");
|
||||
uvScene->setName("uvScene");
|
||||
LangElement *uvSceneDecl = new DecOp(uvScene);
|
||||
|
||||
String rtParamName = String::ToString( "rtParams%s", "lightInfoBuffer" );
|
||||
Var *rtParams = (Var*) LangElement::find( rtParamName );
|
||||
if( !rtParams )
|
||||
String rtParamName = String::ToString("rtParams%s", "diffuseLightingBuffer");
|
||||
Var *rtParams = (Var*)LangElement::find(rtParamName);
|
||||
if (!rtParams)
|
||||
{
|
||||
rtParams = new Var;
|
||||
rtParams->setType( "float4" );
|
||||
rtParams->setName( rtParamName );
|
||||
rtParams->setType("float4");
|
||||
rtParams->setName(rtParamName);
|
||||
rtParams->uniform = true;
|
||||
rtParams->constSortPos = cspPass;
|
||||
}
|
||||
|
|
@ -182,7 +183,7 @@ void DeferredRTLightingFeatHLSL::processPix( Vector<ShaderComponent*> &component
|
|||
ShaderFeature::Resources DeferredRTLightingFeatHLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
return Parent::getResources( fd );
|
||||
|
||||
// HACK: See DeferredRTLightingFeatHLSL::setTexData.
|
||||
|
|
@ -200,7 +201,7 @@ void DeferredRTLightingFeatHLSL::setTexData( Material::StageData &stageDat,
|
|||
U32 &texIndex )
|
||||
{
|
||||
// Skip deferred features, and use forward shading instead
|
||||
if ( fd.features[MFT_ForwardShading] )
|
||||
if ( !fd.features[MFT_isDeferred] )
|
||||
{
|
||||
Parent::setTexData( stageDat, fd, passData, texIndex );
|
||||
return;
|
||||
|
|
@ -214,7 +215,7 @@ void DeferredRTLightingFeatHLSL::setTexData( Material::StageData &stageDat,
|
|||
mLastTexIndex = texIndex;
|
||||
|
||||
passData.mTexType[ texIndex ] = Material::TexTarget;
|
||||
passData.mSamplerNames[ texIndex ]= "lightInfoBuffer";
|
||||
passData.mSamplerNames[ texIndex ]= "diffuseLightingBuffer";
|
||||
passData.mTexSlot[ texIndex++ ].texTarget = texTarget;
|
||||
}
|
||||
}
|
||||
|
|
@ -252,7 +253,7 @@ void DeferredBumpFeatHLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
output = meta;
|
||||
}
|
||||
else if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processVert( componentList, fd );
|
||||
|
|
@ -412,13 +413,13 @@ void DeferredBumpFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
}
|
||||
}
|
||||
else if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processPix( componentList, fd );
|
||||
return;
|
||||
}
|
||||
else if ( fd.features[MFT_PixSpecular] && !fd.features[MFT_SpecularMap] )
|
||||
else if (!fd.features[MFT_SpecularMap] )
|
||||
{
|
||||
Var *bumpSample = (Var *)LangElement::find( "bumpSample" );
|
||||
if( bumpSample == NULL )
|
||||
|
|
@ -426,13 +427,13 @@ void DeferredBumpFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
Var *texCoord = getInTexCoord( "texCoord", "float2", componentList );
|
||||
|
||||
Var *bumpMap = getNormalMapTex();
|
||||
Var *bumpMapTex = (Var *)LangElement::find("bumpMapTex");
|
||||
|
||||
bumpSample = new Var;
|
||||
bumpSample->setType( "float4" );
|
||||
bumpSample->setName( "bumpSample" );
|
||||
LangElement *bumpSampleDecl = new DecOp( bumpSample );
|
||||
bumpSample->setType("float4");
|
||||
bumpSample->setName("bumpSample");
|
||||
|
||||
Var *bumpMapTex = (Var *)LangElement::find("bumpMapTex");
|
||||
LangElement *bumpSampleDecl = new DecOp(bumpSample);
|
||||
output = new GenOp(" @ = @.Sample(@, @);\r\n", bumpSampleDecl, bumpMapTex, bumpMap, texCoord);
|
||||
|
||||
return;
|
||||
|
|
@ -445,7 +446,7 @@ void DeferredBumpFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
ShaderFeature::Resources DeferredBumpFeatHLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
fd.features[MFT_Parallax] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
return Parent::getResources( fd );
|
||||
|
|
@ -474,7 +475,7 @@ void DeferredBumpFeatHLSL::setTexData( Material::StageData &stageDat,
|
|||
U32 &texIndex )
|
||||
{
|
||||
if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_isDeferred] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::setTexData( stageDat, fd, passData, texIndex );
|
||||
|
|
@ -495,8 +496,7 @@ void DeferredBumpFeatHLSL::setTexData( Material::StageData &stageDat,
|
|||
}
|
||||
}
|
||||
else if ( !fd.features[MFT_Parallax] && !fd.features[MFT_SpecularMap] &&
|
||||
( fd.features[MFT_DeferredConditioner] ||
|
||||
fd.features[MFT_PixSpecular] ) )
|
||||
( fd.features[MFT_DeferredConditioner]) )
|
||||
{
|
||||
passData.mTexType[ texIndex ] = Material::Bump;
|
||||
passData.mSamplerNames[ texIndex ] = "bumpMap";
|
||||
|
|
@ -512,117 +512,10 @@ void DeferredBumpFeatHLSL::setTexData( Material::StageData &stageDat,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void DeferredPixelSpecularHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processVert( componentList, fd );
|
||||
return;
|
||||
}
|
||||
output = NULL;
|
||||
}
|
||||
|
||||
void DeferredPixelSpecularHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processPix( componentList, fd );
|
||||
return;
|
||||
}
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
Var *specular = new Var;
|
||||
specular->setType( "float" );
|
||||
specular->setName( "specular" );
|
||||
LangElement * specDecl = new DecOp( specular );
|
||||
|
||||
Var *specCol = (Var*)LangElement::find( "specularColor" );
|
||||
if(specCol == NULL)
|
||||
{
|
||||
specCol = new Var;
|
||||
specCol->setType( "float4" );
|
||||
specCol->setName( "specularColor" );
|
||||
specCol->uniform = true;
|
||||
specCol->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
Var *specPow = new Var;
|
||||
specPow->setType( "float" );
|
||||
specPow->setName( "specularPower" );
|
||||
|
||||
// If the gloss map flag is set, than the specular power is in the alpha
|
||||
// channel of the specular map
|
||||
if( fd.features[ MFT_GlossMap ] )
|
||||
meta->addStatement( new GenOp( " @ = @.a * 255;\r\n", new DecOp( specPow ), specCol ) );
|
||||
else
|
||||
{
|
||||
specPow->uniform = true;
|
||||
specPow->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
Var *specStrength = (Var*)LangElement::find( "specularStrength" );
|
||||
if (!specStrength)
|
||||
{
|
||||
specStrength = new Var( "specularStrength", "float" );
|
||||
specStrength->uniform = true;
|
||||
specStrength->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
Var *lightInfoSamp = (Var *)LangElement::find( "lightInfoSample" );
|
||||
Var *d_specular = (Var*)LangElement::find( "d_specular" );
|
||||
Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
|
||||
|
||||
AssertFatal( lightInfoSamp && d_specular && d_NL_Att,
|
||||
"DeferredPixelSpecularHLSL::processPix - Something hosed the deferred features!" );
|
||||
|
||||
if (fd.features[ MFT_AccuMap ])
|
||||
{
|
||||
// change specularity where the accu texture is applied
|
||||
Var *accuPlc = (Var*) LangElement::find( "plc" );
|
||||
Var *accuSpecular = (Var*)LangElement::find( "accuSpecular" );
|
||||
if(accuPlc != NULL && accuSpecular != NULL)
|
||||
//d_specular = clamp(lerp( d_specular, accuSpecular * d_specular, plc.a), 0, 1)
|
||||
meta->addStatement( new GenOp( " @ = clamp( lerp( @, @ * @, @.a), 0, 1);\r\n", d_specular, d_specular, accuSpecular, d_specular, accuPlc ) );
|
||||
}
|
||||
|
||||
// (a^m)^n = a^(m*n)
|
||||
meta->addStatement( new GenOp( " @ = pow( abs(@), max((@ / AL_ConstantSpecularPower),1.0f)) * @;\r\n",
|
||||
specDecl, d_specular, specPow, specStrength));
|
||||
|
||||
LangElement *specMul = new GenOp( "float4( @.rgb, 0 ) * @", specCol, specular );
|
||||
LangElement *final = specMul;
|
||||
|
||||
// We we have a normal map then mask the specular
|
||||
if( !fd.features[MFT_SpecularMap] && fd.features[MFT_NormalMap] )
|
||||
{
|
||||
Var *bumpSample = (Var*)LangElement::find( "bumpSample" );
|
||||
final = new GenOp( "@ * @.a", final, bumpSample );
|
||||
}
|
||||
|
||||
// add to color
|
||||
meta->addStatement( new GenOp( " @;\r\n", assignColor( final, Material::Add ) ) );
|
||||
|
||||
output = meta;
|
||||
}
|
||||
|
||||
ShaderFeature::Resources DeferredPixelSpecularHLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
return Parent::getResources( fd );
|
||||
|
||||
Resources res;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
ShaderFeature::Resources DeferredMinnaertHLSL::getResources( const MaterialFeatureData &fd )
|
||||
{
|
||||
Resources res;
|
||||
if( !fd.features[MFT_ForwardShading] && fd.features[MFT_RTLighting] )
|
||||
if( fd.features[MFT_isDeferred] && fd.features[MFT_RTLighting] )
|
||||
{
|
||||
res.numTex = 1;
|
||||
res.numTexReg = 1;
|
||||
|
|
@ -635,7 +528,7 @@ void DeferredMinnaertHLSL::setTexData( Material::StageData &stageDat,
|
|||
RenderPassData &passData,
|
||||
U32 &texIndex )
|
||||
{
|
||||
if( !fd.features[MFT_ForwardShading] && fd.features[MFT_RTLighting] )
|
||||
if( fd.features[MFT_isDeferred] && fd.features[MFT_RTLighting] )
|
||||
{
|
||||
NamedTexTarget *texTarget = NamedTexTarget::find(RenderDeferredMgr::BufferName);
|
||||
if ( texTarget )
|
||||
|
|
@ -650,7 +543,7 @@ void DeferredMinnaertHLSL::setTexData( Material::StageData &stageDat,
|
|||
void DeferredMinnaertHLSL::processPixMacros( Vector<GFXShaderMacro> ¯os,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if( !fd.features[MFT_ForwardShading] && fd.features[MFT_RTLighting] )
|
||||
if( fd.features[MFT_isDeferred] && fd.features[MFT_RTLighting] )
|
||||
{
|
||||
// Pull in the uncondition method for the g buffer
|
||||
NamedTexTarget *texTarget = NamedTexTarget::find( RenderDeferredMgr::BufferName );
|
||||
|
|
@ -667,7 +560,7 @@ void DeferredMinnaertHLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// If there is no deferred information, bail on this feature
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
if( !fd.features[MFT_isDeferred] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
output = NULL;
|
||||
return;
|
||||
|
|
@ -684,7 +577,7 @@ void DeferredMinnaertHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// If there is no deferred information, bail on this feature
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
if( !fd.features[MFT_isDeferred] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
output = NULL;
|
||||
return;
|
||||
|
|
@ -737,12 +630,6 @@ void DeferredMinnaertHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
void DeferredSubSurfaceHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
// If there is no deferred information, bail on this feature
|
||||
if( fd.features[MFT_ForwardShading] || !fd.features[MFT_RTLighting] )
|
||||
{
|
||||
output = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
Var *subSurfaceParams = new Var;
|
||||
subSurfaceParams->setType( "float4" );
|
||||
|
|
@ -754,9 +641,13 @@ void DeferredSubSurfaceHLSL::processPix( Vector<ShaderComponent*> &componentLis
|
|||
Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
meta->addStatement( new GenOp( " float subLamb = smoothstep(-@.a, 1.0, @) - smoothstep(0.0, 1.0, @);\r\n", subSurfaceParams, d_NL_Att, d_NL_Att ) );
|
||||
meta->addStatement( new GenOp( " subLamb = max(0.0, subLamb);\r\n" ) );
|
||||
meta->addStatement( new GenOp( " @;\r\n", assignColor( new GenOp( "float4(@ + (subLamb * @.rgb), 1.0)", d_lightcolor, subSurfaceParams ), Material::Mul ) ) );
|
||||
if (fd.features[MFT_isDeferred])
|
||||
{
|
||||
Var* targ = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::RenderTarget3));
|
||||
meta->addStatement(new GenOp(" @.rgb += @.rgb*@.a;\r\n", targ, subSurfaceParams, subSurfaceParams));
|
||||
output = meta;
|
||||
return;
|
||||
}
|
||||
|
||||
output = meta;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,28 +102,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
/// Generates specular highlights in the forward pass
|
||||
/// from the light deferred buffer.
|
||||
class DeferredPixelSpecularHLSL : public PixelSpecularHLSL
|
||||
{
|
||||
typedef PixelSpecularHLSL Parent;
|
||||
|
||||
public:
|
||||
virtual void processVert( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd );
|
||||
|
||||
virtual void processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd );
|
||||
|
||||
virtual Resources getResources( const MaterialFeatureData &fd );
|
||||
|
||||
virtual String getName()
|
||||
{
|
||||
return "Pixel Specular [Deferred]";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
class DeferredMinnaertHLSL : public ShaderFeatureHLSL
|
||||
{
|
||||
|
|
@ -167,4 +145,4 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
#endif // _DEFERREDFEATURESHLSL_H_
|
||||
#endif // _DEFERREDFEATURESHLSL_H_
|
||||
|
|
|
|||
|
|
@ -69,20 +69,23 @@ void DeferredSpecMapHLSL::processPix( Vector<ShaderComponent*> &componentList, c
|
|||
specularMapTex->uniform = true;
|
||||
specularMapTex->texture = true;
|
||||
specularMapTex->constNum = specularMap->constNum;
|
||||
|
||||
//matinfo.g slot reserved for AO later
|
||||
Var* specColor = new Var;
|
||||
specColor->setName("specColor");
|
||||
specColor->setType("float4");
|
||||
LangElement *specColorElem = new DecOp(specColor);
|
||||
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
//sample specular map
|
||||
meta->addStatement(new GenOp(" @ = @.Sample(@, @);\r\n", specColorElem, specularMapTex, specularMap, texCoord));
|
||||
LangElement *texOp = new GenOp(" @.Sample(@, @)", specularMapTex, specularMap, texCoord);
|
||||
|
||||
meta->addStatement(new GenOp(" @.b = dot(@.rgb, float3(0.3, 0.59, 0.11));\r\n", material, specColor));
|
||||
meta->addStatement(new GenOp(" @.a = @.a;\r\n", material, specColor));
|
||||
Var * pbrConfig = (Var*)LangElement::find("pbrConfig");
|
||||
if (!pbrConfig) pbrConfig = new Var("pbrConfig", "float4");
|
||||
Var *metalness = (Var*)LangElement::find("metalness");
|
||||
if (!metalness) metalness = new Var("metalness", "float");
|
||||
Var *smoothness = (Var*)LangElement::find("smoothness");
|
||||
if (!smoothness) smoothness = new Var("smoothness", "float");
|
||||
|
||||
meta->addStatement(new GenOp(" @ = @.r;\r\n", new DecOp(smoothness), texOp));
|
||||
meta->addStatement(new GenOp(" @ = @.b;\r\n", new DecOp(metalness), texOp));
|
||||
|
||||
if (fd.features[MFT_InvertSmoothness])
|
||||
meta->addStatement(new GenOp(" @ = 1.0-@;\r\n", smoothness, smoothness));
|
||||
|
||||
meta->addStatement(new GenOp(" @ = @.ggga;\r\n", new DecOp(pbrConfig), texOp));
|
||||
meta->addStatement(new GenOp(" @.bga = float3(@,@.g,@);\r\n", material, smoothness, pbrConfig, metalness));
|
||||
output = meta;
|
||||
}
|
||||
|
||||
|
|
@ -159,43 +162,42 @@ void DeferredSpecVarsHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
material->setStructName( "OUT" );
|
||||
}
|
||||
|
||||
Var *specStrength = new Var;
|
||||
specStrength->setType( "float" );
|
||||
specStrength->setName( "specularStrength" );
|
||||
specStrength->uniform = true;
|
||||
specStrength->constSortPos = cspPotentialPrimitive;
|
||||
Var *metalness = new Var("metalness", "float");
|
||||
metalness->uniform = true;
|
||||
metalness->constSortPos = cspPotentialPrimitive;
|
||||
|
||||
Var *specPower = new Var;
|
||||
specPower->setType( "float" );
|
||||
specPower->setName( "specularPower" );
|
||||
specPower->uniform = true;
|
||||
specPower->constSortPos = cspPotentialPrimitive;
|
||||
Var *smoothness = new Var("smoothness", "float");
|
||||
smoothness->uniform = true;
|
||||
smoothness->constSortPos = cspPotentialPrimitive;
|
||||
|
||||
MultiLine * meta = new MultiLine;
|
||||
//matinfo.g slot reserved for AO later
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
meta->addStatement(new GenOp(" @.a = @/128;\r\n", material, specPower));
|
||||
meta->addStatement(new GenOp(" @.b = @/5;\r\n", material, specStrength));
|
||||
meta->addStatement(new GenOp(" @.b = @;\r\n", material, smoothness));
|
||||
if (fd.features[MFT_InvertSmoothness])
|
||||
meta->addStatement(new GenOp(" @ = 1.0-@;\r\n", smoothness, smoothness));
|
||||
meta->addStatement(new GenOp(" @.a = @;\r\n", material, metalness));
|
||||
output = meta;
|
||||
}
|
||||
|
||||
// Black -> Blue and Alpha of matinfo Buffer (representing no specular), White->G (representing No AO)
|
||||
void DeferredEmptySpecHLSL::processPix( Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd )
|
||||
//deferred emissive
|
||||
void DeferredEmissiveHLSL::processPix(Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd)
|
||||
{
|
||||
// search for material var
|
||||
Var *material = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::RenderTarget2));
|
||||
if (!material)
|
||||
//for now emission just uses the diffuse color, we could plug in a separate texture for emission at some stage
|
||||
Var *diffuseTargetVar = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::RenderTarget1));
|
||||
if (!diffuseTargetVar)
|
||||
return; //oh dear something is not right, maybe we should just write 0's instead
|
||||
|
||||
// search for scene color target var
|
||||
Var *sceneColorVar = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::RenderTarget3));
|
||||
if (!sceneColorVar)
|
||||
{
|
||||
// create color var
|
||||
material = new Var;
|
||||
material->setType("fragout");
|
||||
material->setName(getOutputTargetVarName(ShaderFeature::RenderTarget2));
|
||||
material->setStructName("OUT");
|
||||
// create scene color target var
|
||||
sceneColorVar = new Var;
|
||||
sceneColorVar->setType("fragout");
|
||||
sceneColorVar->setName(getOutputTargetVarName(ShaderFeature::RenderTarget3));
|
||||
sceneColorVar->setStructName("OUT");
|
||||
}
|
||||
|
||||
MultiLine * meta = new MultiLine;
|
||||
//matinfo.g slot reserved for AO later
|
||||
meta->addStatement(new GenOp(" @.g = 1.0;\r\n", material));
|
||||
meta->addStatement(new GenOp(" @.ba = 0.0;\r\n", material));
|
||||
output = meta;
|
||||
}
|
||||
output = new GenOp("@ = float4(@.rgb,0);", sceneColorVar, diffuseTargetVar);
|
||||
}
|
||||
|
|
@ -70,15 +70,15 @@ public:
|
|||
virtual U32 getOutputTargets( const MaterialFeatureData &fd ) const { return ShaderFeature::RenderTarget2; }
|
||||
};
|
||||
|
||||
class DeferredEmptySpecHLSL : public ShaderFeatureHLSL
|
||||
class DeferredEmissiveHLSL : public ShaderFeatureHLSL
|
||||
{
|
||||
public:
|
||||
virtual String getName() { return "Deferred Shading: Empty Specular"; }
|
||||
virtual String getName() { return "Deferred Shading: Emissive"; }
|
||||
|
||||
virtual void processPix( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd );
|
||||
|
||||
virtual U32 getOutputTargets( const MaterialFeatureData &fd ) const { return ShaderFeature::RenderTarget2; }
|
||||
virtual void processPix(Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd);
|
||||
|
||||
virtual U32 getOutputTargets(const MaterialFeatureData &fd) const { return ShaderFeature::RenderTarget3; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -167,7 +167,7 @@ void BasicLightManager::activate( SceneManager *sceneManager )
|
|||
FEATUREMGR->registerFeature( MFT_ToneMap, new TonemapFeatGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_NormalMap, new BumpFeatGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_RTLighting, new RTLightingFeatGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_PixSpecular, new PixelSpecularGLSL );
|
||||
FEATUREMGR->registerFeature(MFT_ReflectionProbes, new ReflectionProbeFeatGLSL);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
|
@ -177,7 +177,7 @@ void BasicLightManager::activate( SceneManager *sceneManager )
|
|||
FEATUREMGR->registerFeature( MFT_ToneMap, new TonemapFeatHLSL );
|
||||
FEATUREMGR->registerFeature( MFT_NormalMap, new BumpFeatHLSL );
|
||||
FEATUREMGR->registerFeature( MFT_RTLighting, new RTLightingFeatHLSL );
|
||||
FEATUREMGR->registerFeature( MFT_PixSpecular, new PixelSpecularHLSL );
|
||||
FEATUREMGR->registerFeature(MFT_ReflectionProbes, new ReflectionProbeFeatHLSL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ void LightManager::setSpecialLight( LightManager::SpecialLightTypesEnum type, Li
|
|||
registerGlobalLight( light, NULL );
|
||||
}
|
||||
|
||||
void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLighting )
|
||||
void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLighting, bool enableZoneLightCulling)
|
||||
{
|
||||
PROFILE_SCOPE( LightManager_RegisterGlobalLights );
|
||||
|
||||
|
|
@ -225,14 +225,17 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
|||
else
|
||||
{
|
||||
// Cull the lights using the frustum.
|
||||
getSceneManager()->getContainer()->findObjectList( *frustum, lightMask, &activeLights );
|
||||
getSceneManager()->getContainer()->findObjectList(*frustum, lightMask, &activeLights);
|
||||
/*
|
||||
for (U32 i = 0; i < activeLights.size(); ++i)
|
||||
{
|
||||
if (!getSceneManager()->mRenderedObjectsList.contains(activeLights[i]))
|
||||
for (U32 i = 0; i < activeLights.size(); ++i)
|
||||
{
|
||||
activeLights.erase(i);
|
||||
--i;
|
||||
if (!getSceneManager()->mRenderedObjectsList.contains(activeLights[i]))
|
||||
{
|
||||
activeLights.erase(i);
|
||||
--i;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -245,10 +248,10 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
|||
// the shape bounds and can often get culled.
|
||||
|
||||
GameConnection *conn = GameConnection::getConnectionToServer();
|
||||
if ( conn->getControlObject() )
|
||||
if (conn->getControlObject())
|
||||
{
|
||||
GameBase *conObject = conn->getControlObject();
|
||||
activeLights.push_back_unique( conObject );
|
||||
activeLights.push_back_unique(conObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +309,7 @@ void LightManager::_update4LightConsts( const SceneData &sgData,
|
|||
GFXShaderConstHandle *lightInvRadiusSqSC,
|
||||
GFXShaderConstHandle *lightSpotDirSC,
|
||||
GFXShaderConstHandle *lightSpotAngleSC,
|
||||
GFXShaderConstHandle *lightSpotFalloffSC,
|
||||
GFXShaderConstHandle *lightSpotFalloffSC,
|
||||
GFXShaderConstBuffer *shaderConsts )
|
||||
{
|
||||
PROFILE_SCOPE( LightManager_Update4LightConsts );
|
||||
|
|
@ -321,12 +324,12 @@ void LightManager::_update4LightConsts( const SceneData &sgData,
|
|||
{
|
||||
PROFILE_SCOPE( LightManager_Update4LightConsts_setLights );
|
||||
|
||||
static AlignedArray<Point4F> lightPositions( 3, sizeof( Point4F ) );
|
||||
static AlignedArray<Point4F> lightSpotDirs( 3, sizeof( Point4F ) );
|
||||
static AlignedArray<Point4F> lightPositions( 3, sizeof( Point4F ) );
|
||||
static AlignedArray<Point4F> lightSpotDirs( 3, sizeof( Point4F ) );
|
||||
static AlignedArray<Point4F> lightColors( 4, sizeof( Point4F ) );
|
||||
static Point4F lightInvRadiusSq;
|
||||
static Point4F lightSpotAngle;
|
||||
static Point4F lightSpotFalloff;
|
||||
static Point4F lightSpotFalloff;
|
||||
F32 range;
|
||||
|
||||
// Need to clear the buffers so that we don't leak
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ public:
|
|||
virtual void registerLocalLight( LightInfo *light );
|
||||
virtual void unregisterLocalLight( LightInfo *light );
|
||||
|
||||
virtual void registerGlobalLights( const Frustum *frustum, bool staticlighting );
|
||||
virtual void registerGlobalLights( const Frustum *frustum, bool staticlighting, bool enableZoneLightCulling = false );
|
||||
virtual void unregisterAllLights();
|
||||
|
||||
/// Returns all unsorted and un-scored lights (both global and local).
|
||||
|
|
|
|||
|
|
@ -583,6 +583,7 @@ void MatInstance::dumpShaderInfo() const
|
|||
|
||||
Con::printf( "Material Info for object %s - %s", mMaterial->getName(), mMaterial->mMapTo.c_str() );
|
||||
|
||||
|
||||
if ( mProcessedMaterial == NULL )
|
||||
{
|
||||
Con::printf( " [no processed material!]" );
|
||||
|
|
|
|||
|
|
@ -116,11 +116,16 @@ Material::Material()
|
|||
{
|
||||
mDiffuse[i].set( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
mDiffuseMapSRGB[i] = true;
|
||||
mSpecular[i].set( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
mSpecularPower[i] = 8.0f;
|
||||
mSpecularStrength[i] = 1.0f;
|
||||
mPixelSpecular[i] = false;
|
||||
mSmoothness[i] = 0.0f;
|
||||
mMetalness[i] = 0.0f;
|
||||
|
||||
mIsSRGb[i] = false;
|
||||
mInvertSmoothness[i] = false;
|
||||
|
||||
mSmoothnessChan[i] = 0;
|
||||
mAOChan[i] = 1;
|
||||
mMetalChan[i] = 2;
|
||||
|
||||
mAccuEnabled[i] = false;
|
||||
mAccuScale[i] = 1.0f;
|
||||
|
|
@ -166,6 +171,9 @@ Material::Material()
|
|||
|
||||
// Deferred Shading
|
||||
mMatInfoFlags[i] = 0.0f;
|
||||
mRoughMapFilename[i].clear();
|
||||
mAOMapFilename[i].clear();
|
||||
mMetalMapFilename[i].clear();
|
||||
}
|
||||
|
||||
dMemset(mCellIndex, 0, sizeof(mCellIndex));
|
||||
|
|
@ -255,20 +263,12 @@ void Material::initPersistFields()
|
|||
|
||||
addField( "detailNormalMapStrength", TypeF32, Offset(mDetailNormalMapStrength, Material), MAX_STAGES,
|
||||
"Used to scale the strength of the detail normal map when blended with the base normal map." );
|
||||
|
||||
addField("smoothness", TypeF32, Offset(mSmoothness, Material), MAX_STAGES,
|
||||
"The degree of smoothness when not using a specularMap." );
|
||||
|
||||
addField("specular", TypeColorF, Offset(mSpecular, Material), MAX_STAGES,
|
||||
"The color of the specular highlight when not using a specularMap." );
|
||||
|
||||
addField("specularPower", TypeF32, Offset(mSpecularPower, Material), MAX_STAGES,
|
||||
"The hardness of the specular highlight when not using a specularMap." );
|
||||
|
||||
addField("specularStrength", TypeF32, Offset(mSpecularStrength, Material), MAX_STAGES,
|
||||
"The strength of the specular highlight when not using a specularMap." );
|
||||
|
||||
addField("pixelSpecular", TypeBool, Offset(mPixelSpecular, Material), MAX_STAGES,
|
||||
"This enables per-pixel specular highlights controlled by the alpha channel of the "
|
||||
"normal map texture. Note that if pixel specular is enabled the DXTnm format will not "
|
||||
"work with your normal map, unless you are also using a specular map." );
|
||||
addField("metalness", TypeF32, Offset(mMetalness, Material), MAX_STAGES,
|
||||
"The degree of Metalness when not using a specularMap." );
|
||||
|
||||
addProtectedField( "accuEnabled", TYPEID< bool >(), Offset( mAccuEnabled, Material ),
|
||||
&_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture." );
|
||||
|
|
@ -288,10 +288,31 @@ void Material::initPersistFields()
|
|||
addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES,
|
||||
"Changes specularity to this value where the accumulated material is present.");
|
||||
|
||||
addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES,
|
||||
"Substance Designer Workaround.");
|
||||
|
||||
addField("invertSmoothness", TypeBool, Offset(mInvertSmoothness, Material), MAX_STAGES,
|
||||
"Treat Smoothness as Roughness");
|
||||
|
||||
addField( "specularMap", TypeImageFilename, Offset(mSpecularMapFilename, Material), MAX_STAGES,
|
||||
"The specular map texture. The RGB channels of this texture provide a per-pixel replacement for the 'specular' parameter on the material. "
|
||||
"If this texture contains alpha information, the alpha channel of the texture will be used as the gloss map. "
|
||||
"This provides a per-pixel replacement for the 'specularPower' on the material" );
|
||||
"Prepacked specular map texture. The RGB channels of this texture provide per-pixel reference values for: "
|
||||
"smoothness (R), Ambient Occlusion (G), and metalness(B)");
|
||||
|
||||
addField("roughMap", TypeImageFilename, Offset(mRoughMapFilename, Material), MAX_STAGES,
|
||||
"smoothness map. will be packed into the R channel of a packed 'specular' map");
|
||||
addField("smoothnessChan", TypeF32, Offset(mSmoothnessChan, Material), MAX_STAGES,
|
||||
"The input channel smoothness maps use.");
|
||||
|
||||
addField("aoMap", TypeImageFilename, Offset(mAOMapFilename, Material), MAX_STAGES,
|
||||
"Ambient Occlusion map. will be packed into the G channel of a packed 'specular' map");
|
||||
addField("AOChan", TypeF32, Offset(mAOChan, Material), MAX_STAGES,
|
||||
"The input channel AO maps use.");
|
||||
|
||||
addField("metalMap", TypeImageFilename, Offset(mMetalMapFilename, Material), MAX_STAGES,
|
||||
"Metalness map. will be packed into the B channel of a packed 'specular' map");
|
||||
addField("metalChan", TypeF32, Offset(mMetalChan, Material), MAX_STAGES,
|
||||
"The input channel metalness maps use.");
|
||||
|
||||
|
||||
addField( "parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES,
|
||||
"Enables parallax mapping and defines the scale factor for the parallax effect. Typically "
|
||||
|
|
@ -706,6 +727,13 @@ DefineEngineMethod( Material, setAutoGenerated, void, (bool isAutoGenerated), ,
|
|||
object->setAutoGenerated(isAutoGenerated);
|
||||
}
|
||||
|
||||
DefineEngineMethod(Material, getAutogeneratedFile, const char*, (), , "Get filename of autogenerated shader file")
|
||||
{
|
||||
SimObject *material = static_cast<SimObject *>(object);
|
||||
return material->getFilename();
|
||||
}
|
||||
|
||||
|
||||
// Accumulation
|
||||
bool Material::_setAccuEnabled( void *object, const char *index, const char *data )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,7 +213,15 @@ public:
|
|||
FileName mDetailMapFilename[MAX_STAGES];
|
||||
FileName mNormalMapFilename[MAX_STAGES];
|
||||
|
||||
bool mIsSRGb[MAX_STAGES];
|
||||
bool mInvertSmoothness[MAX_STAGES];
|
||||
FileName mSpecularMapFilename[MAX_STAGES];
|
||||
FileName mRoughMapFilename[MAX_STAGES];
|
||||
F32 mSmoothnessChan[MAX_STAGES];
|
||||
FileName mAOMapFilename[MAX_STAGES];
|
||||
F32 mAOChan[MAX_STAGES];
|
||||
FileName mMetalMapFilename[MAX_STAGES];
|
||||
F32 mMetalChan[MAX_STAGES];
|
||||
|
||||
/// A second normal map which repeats at the detail map
|
||||
/// scale and blended with the base normal map.
|
||||
|
|
@ -226,13 +234,10 @@ public:
|
|||
/// or if it has a texture it is multiplied against
|
||||
/// the diffuse texture color.
|
||||
LinearColorF mDiffuse[MAX_STAGES];
|
||||
|
||||
LinearColorF mSpecular[MAX_STAGES];
|
||||
|
||||
F32 mSpecularPower[MAX_STAGES];
|
||||
F32 mSpecularStrength[MAX_STAGES];
|
||||
bool mPixelSpecular[MAX_STAGES];
|
||||
|
||||
|
||||
F32 mSmoothness[MAX_STAGES];
|
||||
F32 mMetalness[MAX_STAGES];
|
||||
|
||||
bool mVertLit[MAX_STAGES];
|
||||
|
||||
/// If true for a stage, vertex colors are multiplied
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ ImplementFeatureType( MFT_DetailMap, MFG_Texture, 4.0f, true );
|
|||
ImplementFeatureType( MFT_DiffuseColor, MFG_Texture, 5.0f, true );
|
||||
ImplementFeatureType( MFT_DiffuseVertColor, MFG_Texture, 6.0f, true );
|
||||
ImplementFeatureType( MFT_AlphaTest, MFG_Texture, 7.0f, true );
|
||||
ImplementFeatureType(MFT_InvertSmoothness, U32(-1), -1, true);
|
||||
ImplementFeatureType( MFT_SpecularMap, MFG_Texture, 8.0f, true );
|
||||
ImplementFeatureType( MFT_NormalMap, MFG_Texture, 9.0f, true );
|
||||
ImplementFeatureType( MFT_DetailNormalMap, MFG_Texture, 10.0f, true );
|
||||
|
|
@ -50,15 +51,17 @@ ImplementFeatureType( MFT_Imposter, U32(-1), -1, true );
|
|||
|
||||
ImplementFeatureType( MFT_AccuMap, MFG_PreLighting, 2.0f, true );
|
||||
|
||||
ImplementFeatureType(MFT_ReflectionProbes, MFG_Lighting, 1.0f, true);
|
||||
ImplementFeatureType( MFT_RTLighting, MFG_Lighting, 2.0f, true );
|
||||
ImplementFeatureType( MFT_SubSurface, MFG_Lighting, 3.0f, true );
|
||||
ImplementFeatureType( MFT_LightMap, MFG_Lighting, 4.0f, true );
|
||||
ImplementFeatureType( MFT_ToneMap, MFG_Lighting, 5.0f, true );
|
||||
ImplementFeatureType( MFT_VertLitTone, MFG_Lighting, 6.0f, false );
|
||||
ImplementFeatureType( MFT_VertLit, MFG_Lighting, 7.0f, true );
|
||||
ImplementFeatureType( MFT_PixSpecular, MFG_Lighting, 9.0f, true );
|
||||
ImplementFeatureType( MFT_LightMap, MFG_Lighting, 3.0f, true );
|
||||
ImplementFeatureType( MFT_ToneMap, MFG_Lighting, 4.0f, true );
|
||||
ImplementFeatureType( MFT_VertLitTone, MFG_Lighting, 5.0f, false );
|
||||
ImplementFeatureType( MFT_StaticCubemap, U32(-1), -1.0, true );
|
||||
ImplementFeatureType( MFT_CubeMap, MFG_Lighting, 7.0f, true );
|
||||
ImplementFeatureType( MFT_SubSurface, MFG_Lighting, 8.0f, true );
|
||||
ImplementFeatureType( MFT_VertLit, MFG_Lighting, 9.0f, true );
|
||||
ImplementFeatureType( MFT_MinnaertShading, MFG_Lighting, 10.0f, true );
|
||||
ImplementFeatureType( MFT_CubeMap, MFG_Lighting, 11.0f, true );
|
||||
|
||||
|
||||
ImplementFeatureType( MFT_GlowMask, MFG_PostLighting, 1.0f, true );
|
||||
ImplementFeatureType( MFT_Visibility, MFG_PostLighting, 2.0f, true );
|
||||
|
|
@ -99,11 +102,10 @@ ImplementFeatureType( MFT_ImposterVert, MFG_PreTransform, 1.0, false );
|
|||
// Deferred Shading
|
||||
ImplementFeatureType( MFT_isDeferred, U32(-1), -1, true );
|
||||
ImplementFeatureType( MFT_SkyBox, MFG_Transform, 1.0f, false );
|
||||
ImplementFeatureType( MFT_DeferredEmptySpec, MFG_Texture, 8.01f, false );
|
||||
|
||||
ImplementFeatureType( MFT_DeferredSpecMap, MFG_Texture, 8.2f, false );
|
||||
ImplementFeatureType( MFT_DeferredSpecVars, MFG_Texture, 8.5f, false );
|
||||
ImplementFeatureType( MFT_DeferredMatInfoFlags, MFG_Texture, 8.7f, false );
|
||||
ImplementFeatureType( MFT_DeferredEmissive, MFG_Texture, 8.9f, false);
|
||||
|
||||
ImplementFeatureType( MFT_HardwareSkinning, MFG_Transform,-2.0, false );
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue