mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- GZDoom solution file
- missing GL resources for gzdoom.pk3.
This commit is contained in:
parent
b2bb24ea0a
commit
e00847f64b
22 changed files with 811 additions and 0 deletions
177
gzdoom.sln
Normal file
177
gzdoom.sln
Normal file
|
@ -0,0 +1,177 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gzdoom", "gzdoom.vcproj", "{8049475B-5C87-46F9-9358-635218A4EF18}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96} = {9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} = {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859} = {6077B7D6-349F-4077-B552-3BC302EF5859}
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} = {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7} = {0F80ACBF-460E-44F0-B28E-B3272D1774A7}
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77} = {DA47396F-60C1-4BDE-A977-7F7DE461CF77}
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F} = {1D179D4B-F008-431B-8C72-111F8372584F}
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054} = {B68E0ABF-B627-48A3-A92F-D8F827A75054}
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953} = {8997289F-10BF-4678-8BAA-3BB509C84953}
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466} = {AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4} = {A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F} = {6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcproj", "{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lemon", "tools\lemon\lemon.vcproj", "{0F80ACBF-460E-44F0-B28E-B3272D1774A7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "tools\re2c\re2c.vcproj", "{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wadsrc", "wadsrc\wadsrc.vcproj", "{1D179D4B-F008-431B-8C72-111F8372584F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3} = {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "updaterevision", "tools\updaterevision\updaterevision.vcproj", "{6077B7D6-349F-4077-B552-3BC302EF5859}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg-6b", "jpeg-6b\jpeg-6b.vcproj", "{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fixrtext", "tools\fixrtext\fixrtext.vcproj", "{DA47396F-60C1-4BDE-A977-7F7DE461CF77}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dumb_static", "dumb\vc6\dumb_static\dumb_static.vcproj", "{8997289F-10BF-4678-8BAA-3BB509C84953}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdtoa", "gdtoa\gdtoa.vcproj", "{B68E0ABF-B627-48A3-A92F-D8F827A75054}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zipdir", "tools\zipdir\zipdir.vcproj", "{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4} = {A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} = {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F} = {6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lzmalib", "lzma\lzmalib.vcproj", "{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "bzip2\bzip2.vcproj", "{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game-music-emu", "game-music-emu\game-music-emu.vcproj", "{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Debug|x64.Build.0 = Debug|x64
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Release|Win32.Build.0 = Release|Win32
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Release|x64.ActiveCfg = Release|x64
|
||||
{8049475B-5C87-46F9-9358-635218A4EF18}.Release|x64.Build.0 = Release|x64
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|x64.Build.0 = Debug|x64
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|Win32.Build.0 = Release|Win32
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|x64.ActiveCfg = Release|x64
|
||||
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|x64.Build.0 = Release|x64
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|x64.ActiveCfg = Release|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|x64.Build.0 = Release|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Release|Win32.Build.0 = Release|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Release|x64.Build.0 = Release|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Debug|x64.ActiveCfg = Release|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Debug|x64.Build.0 = Release|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Release|Win32.Build.0 = Release|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Release|x64.ActiveCfg = Release|Win32
|
||||
{667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}.Release|x64.Build.0 = Release|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Debug|x64.ActiveCfg = Release|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Debug|x64.Build.0 = Release|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Release|Win32.Build.0 = Release|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1D179D4B-F008-431B-8C72-111F8372584F}.Release|x64.Build.0 = Release|Win32
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|x64.Build.0 = Debug|x64
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Release|Win32.Build.0 = Release|Win32
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Release|x64.ActiveCfg = Release|x64
|
||||
{6077B7D6-349F-4077-B552-3BC302EF5859}.Release|x64.Build.0 = Release|x64
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|x64.Build.0 = Debug|x64
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|Win32.Build.0 = Release|Win32
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|x64.ActiveCfg = Release|x64
|
||||
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|x64.Build.0 = Release|x64
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Debug|x64.Build.0 = Debug|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|Win32.Build.0 = Release|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|x64.ActiveCfg = Release|Win32
|
||||
{DA47396F-60C1-4BDE-A977-7F7DE461CF77}.Release|x64.Build.0 = Release|Win32
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Debug|x64.Build.0 = Debug|x64
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Release|Win32.Build.0 = Release|Win32
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Release|x64.ActiveCfg = Release|x64
|
||||
{8997289F-10BF-4678-8BAA-3BB509C84953}.Release|x64.Build.0 = Release|x64
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Debug|x64.Build.0 = Debug|x64
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Release|Win32.Build.0 = Release|Win32
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Release|x64.ActiveCfg = Release|x64
|
||||
{B68E0ABF-B627-48A3-A92F-D8F827A75054}.Release|x64.Build.0 = Release|x64
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|x64.Build.0 = Debug|x64
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|Win32.Build.0 = Release|Win32
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|x64.ActiveCfg = Release|x64
|
||||
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|x64.Build.0 = Release|x64
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Debug|x64.Build.0 = Debug|x64
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Release|Win32.Build.0 = Release|Win32
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Release|x64.ActiveCfg = Release|x64
|
||||
{6EB27E78-7C7A-4F08-8E19-957E8EB3A20F}.Release|x64.Build.0 = Release|x64
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Release|Win32.Build.0 = Release|Win32
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A7DE5C73-D623-4118-A48A-BDFD1FAE97D4}.Release|x64.Build.0 = Release|x64
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Debug|Win32.Build.0 = Release|Win32
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Debug|x64.ActiveCfg = Release|x64
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Debug|x64.Build.0 = Release|x64
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Release|Win32.Build.0 = Release|Win32
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Release|x64.ActiveCfg = Release|x64
|
||||
{9B465A9E-E5C7-4577-B559-3CA2F7AE7D96}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
wadsrc/static/glstuff/gllight.png
Normal file
BIN
wadsrc/static/glstuff/gllight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
wadsrc/static/glstuff/glpart.png
Normal file
BIN
wadsrc/static/glstuff/glpart.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
wadsrc/static/glstuff/glpart2.png
Normal file
BIN
wadsrc/static/glstuff/glpart2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 358 B |
BIN
wadsrc/static/glstuff/mirror.png
Normal file
BIN
wadsrc/static/glstuff/mirror.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
36
wadsrc/static/shaders/glsl/fogboundary.fp
Normal file
36
wadsrc/static/shaders/glsl/fogboundary.fp
Normal file
|
@ -0,0 +1,36 @@
|
|||
uniform int fogenabled;
|
||||
uniform vec4 fogcolor;
|
||||
uniform vec3 camerapos;
|
||||
varying vec4 pixelpos;
|
||||
varying vec4 fogparm;
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Main shader routine
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void main()
|
||||
{
|
||||
float fogdist;
|
||||
float fogfactor;
|
||||
|
||||
//
|
||||
// calculate fog factor
|
||||
//
|
||||
#ifndef NO_SM4
|
||||
if (fogenabled == -1)
|
||||
{
|
||||
fogdist = pixelpos.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
fogdist = max(16.0, distance(pixelpos.xyz, camerapos));
|
||||
}
|
||||
#else
|
||||
fogdist = pixelpos.w;
|
||||
#endif
|
||||
fogfactor = exp2 (fogparm.z * fogdist);
|
||||
gl_FragColor = vec4(fogcolor.rgb, 1.0 - fogfactor);
|
||||
}
|
||||
|
9
wadsrc/static/shaders/glsl/func_brightmap.fp
Normal file
9
wadsrc/static/shaders/glsl/func_brightmap.fp
Normal file
|
@ -0,0 +1,9 @@
|
|||
uniform sampler2D texture2;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec4 brightpix = desaturate(texture2D(texture2, gl_TexCoord[0].st));
|
||||
vec4 texel = getTexel(gl_TexCoord[0].st);
|
||||
return vec4(texel.rgb * min (color.rgb + brightpix.rgb, 1.0), texel.a*color.a);
|
||||
}
|
||||
|
7
wadsrc/static/shaders/glsl/func_normal.fp
Normal file
7
wadsrc/static/shaders/glsl/func_normal.fp
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec4 pix = getTexel(gl_TexCoord[0].st);
|
||||
return pix * color;
|
||||
}
|
||||
|
6
wadsrc/static/shaders/glsl/func_notexture.fp
Normal file
6
wadsrc/static/shaders/glsl/func_notexture.fp
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
17
wadsrc/static/shaders/glsl/func_warp1.fp
Normal file
17
wadsrc/static/shaders/glsl/func_warp1.fp
Normal file
|
@ -0,0 +1,17 @@
|
|||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
|
||||
const float pi = 3.14159265358979323846;
|
||||
vec2 offset = vec2(0,0);
|
||||
|
||||
offset.y = sin(pi * 2.0 * (texCoord.x + timer * 0.125)) * 0.1;
|
||||
offset.x = sin(pi * 2.0 * (texCoord.y + timer * 0.125)) * 0.1;
|
||||
|
||||
texCoord += offset;
|
||||
|
||||
return getTexel(texCoord) * color;
|
||||
}
|
||||
|
18
wadsrc/static/shaders/glsl/func_warp2.fp
Normal file
18
wadsrc/static/shaders/glsl/func_warp2.fp
Normal file
|
@ -0,0 +1,18 @@
|
|||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
|
||||
const float pi = 3.14159265358979323846;
|
||||
vec2 offset = vec2(0.0,0.0);
|
||||
|
||||
float siny = sin(pi * 2.0 * (texCoord.y * 2.2 + timer * 0.75)) * 0.03;
|
||||
offset.y = siny + sin(pi * 2.0 * (texCoord.x * 0.75 + timer * 0.75)) * 0.03;
|
||||
offset.x = siny + sin(pi * 2.0 * (texCoord.x * 1.1 + timer * 0.45)) * 0.02;
|
||||
|
||||
texCoord += offset;
|
||||
|
||||
return getTexel(texCoord) * color;
|
||||
}
|
||||
|
13
wadsrc/static/shaders/glsl/func_wavex.fp
Normal file
13
wadsrc/static/shaders/glsl/func_wavex.fp
Normal file
|
@ -0,0 +1,13 @@
|
|||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
|
||||
const float pi = 3.14159265358979323846;
|
||||
|
||||
texCoord.x += sin(pi * 2.0 * (texCoord.y + timer * 0.125)) * 0.1;
|
||||
|
||||
return getTexel(texCoord) * color;
|
||||
}
|
||||
|
25
wadsrc/static/shaders/glsl/fuzz_jagged.fp
Normal file
25
wadsrc/static/shaders/glsl/fuzz_jagged.fp
Normal file
|
@ -0,0 +1,25 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
|
||||
vec2 texSplat;
|
||||
const float pi = 3.14159265358979323846;
|
||||
texSplat.x = texCoord.x + mod(sin(pi * 2.0 * (texCoord.y + timer * 2.0)),0.1) * 0.1;
|
||||
texSplat.y = texCoord.y + mod(cos(pi * 2.0 * (texCoord.x + timer * 2.0)),0.1) * 0.1;
|
||||
|
||||
vec4 basicColor = getTexel(texSplat) * color;
|
||||
|
||||
float texX = sin(texCoord.x * 100.0 + timer*5.0);
|
||||
float texY = cos(texCoord.x * 100.0 + timer*5.0);
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
|
||||
basicColor.a = basicColor.a * test;
|
||||
|
||||
return basicColor;
|
||||
}
|
21
wadsrc/static/shaders/glsl/fuzz_noise.fp
Normal file
21
wadsrc/static/shaders/glsl/fuzz_noise.fp
Normal file
|
@ -0,0 +1,21 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
vec4 basicColor = getTexel(texCoord) * color;
|
||||
|
||||
texCoord.x = float( int(texCoord.x * 128.0) ) / 128.0;
|
||||
texCoord.y = float( int(texCoord.y * 128.0) ) / 128.0;
|
||||
|
||||
float texX = sin(mod(texCoord.x * 100.0 + timer*5.0, 3.489)) + texCoord.x / 4.0;
|
||||
float texY = cos(mod(texCoord.y * 100.0 + timer*5.0, 3.489)) + texCoord.y / 4.0;
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
basicColor.a = basicColor.a * test;
|
||||
basicColor.rgb = vec3(0.0,0.0,0.0);
|
||||
return basicColor;
|
||||
}
|
19
wadsrc/static/shaders/glsl/fuzz_smooth.fp
Normal file
19
wadsrc/static/shaders/glsl/fuzz_smooth.fp
Normal file
|
@ -0,0 +1,19 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
vec4 basicColor = getTexel(texCoord) * color;
|
||||
|
||||
float texX = texCoord.x / 3.0 + 0.66;
|
||||
float texY = 0.34 - texCoord.y / 3.0;
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
|
||||
basicColor.a = basicColor.a * test;
|
||||
basicColor.r = basicColor.g = basicColor.b = 0.0;
|
||||
|
||||
return basicColor;
|
||||
}
|
20
wadsrc/static/shaders/glsl/fuzz_smoothnoise.fp
Normal file
20
wadsrc/static/shaders/glsl/fuzz_smoothnoise.fp
Normal file
|
@ -0,0 +1,20 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
vec4 basicColor = getTexel(texCoord) * color;
|
||||
|
||||
float texX = sin(mod(texCoord.x * 100.0 + timer*5.0, 3.489)) + texCoord.x / 4.0;
|
||||
float texY = cos(mod(texCoord.y * 100.0 + timer*5.0, 3.489)) + texCoord.y / 4.0;
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
|
||||
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
basicColor.a = basicColor.a * test;
|
||||
|
||||
basicColor.rgb = vec3(0.0,0.0,0.0);
|
||||
return basicColor;
|
||||
}
|
19
wadsrc/static/shaders/glsl/fuzz_smoothtranslucent.fp
Normal file
19
wadsrc/static/shaders/glsl/fuzz_smoothtranslucent.fp
Normal file
|
@ -0,0 +1,19 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
vec4 basicColor = getTexel(texCoord) * color;
|
||||
|
||||
float texX = sin(texCoord.x * 100.0 + timer*5.0);
|
||||
float texY = cos(texCoord.x * 100.0 + timer*5.0);
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
|
||||
basicColor.a = basicColor.a * test;
|
||||
|
||||
return basicColor;
|
||||
}
|
22
wadsrc/static/shaders/glsl/fuzz_standard.fp
Normal file
22
wadsrc/static/shaders/glsl/fuzz_standard.fp
Normal file
|
@ -0,0 +1,22 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
vec4 basicColor = getTexel(texCoord) * color;
|
||||
|
||||
texCoord.x = float( int(texCoord.x * 128.0) ) / 128.0;
|
||||
texCoord.y = float( int(texCoord.y * 128.0) ) / 128.0;
|
||||
|
||||
float texX = texCoord.x / 3.0 + 0.66;
|
||||
float texY = 0.34 - texCoord.y / 3.0;
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
|
||||
basicColor.a = basicColor.a * test;
|
||||
basicColor.r = basicColor.g = basicColor.b = 0.0;
|
||||
|
||||
return basicColor;
|
||||
}
|
19
wadsrc/static/shaders/glsl/fuzz_swirly.fp
Normal file
19
wadsrc/static/shaders/glsl/fuzz_swirly.fp
Normal file
|
@ -0,0 +1,19 @@
|
|||
//created by Evil Space Tomato
|
||||
uniform float timer;
|
||||
|
||||
vec4 Process(vec4 color)
|
||||
{
|
||||
vec2 texCoord = gl_TexCoord[0].st;
|
||||
vec4 basicColor = getTexel(texCoord) * color;
|
||||
|
||||
float texX = sin(texCoord.x * 100.0 + timer*5.0);
|
||||
float texY = cos(texCoord.x * 100.0 + timer*5.0);
|
||||
float vX = (texX/texY)*21.0;
|
||||
float vY = (texY/texX)*13.0;
|
||||
float test = mod(timer*2.0+(vX + vY), 0.5);
|
||||
|
||||
basicColor.a = basicColor.a * test;
|
||||
basicColor.r = basicColor.g = basicColor.b = 0.0;
|
||||
|
||||
return basicColor;
|
||||
}
|
262
wadsrc/static/shaders/glsl/main.fp
Normal file
262
wadsrc/static/shaders/glsl/main.fp
Normal file
|
@ -0,0 +1,262 @@
|
|||
|
||||
// Changing this constant gives results very similar to changing r_visibility.
|
||||
// Default is 232, it seems to give exactly the same light bands as software renderer.
|
||||
#define DOOMLIGHTFACTOR 232.0
|
||||
|
||||
|
||||
#ifdef DYNLIGHT
|
||||
|
||||
// ATI does not like this inside an #ifdef so it will be prepended by the compiling code inside the .EXE now.
|
||||
//#version 120
|
||||
//#extension GL_EXT_gpu_shader4 : enable
|
||||
|
||||
uniform ivec3 lightrange;
|
||||
#ifndef MAXLIGHTS128
|
||||
uniform vec4 lights[256];
|
||||
#else
|
||||
uniform vec4 lights[128];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
uniform int fogenabled;
|
||||
uniform vec4 fogcolor;
|
||||
uniform vec3 dlightcolor;
|
||||
uniform vec3 camerapos;
|
||||
varying vec4 pixelpos;
|
||||
varying vec4 fogparm;
|
||||
//uniform vec2 lightparms;
|
||||
uniform float desaturation_factor;
|
||||
|
||||
uniform vec4 topglowcolor;
|
||||
uniform vec4 bottomglowcolor;
|
||||
varying vec2 glowdist;
|
||||
|
||||
uniform int texturemode;
|
||||
uniform sampler2D tex;
|
||||
|
||||
vec4 Process(vec4 color);
|
||||
|
||||
|
||||
varying float lightlevel;
|
||||
|
||||
#ifdef SOFTLIGHT
|
||||
// Doom lighting equation ripped from EDGE.
|
||||
// Big thanks to EDGE developers for making the only port
|
||||
// that actually replicates software renderer's lighting in OpenGL.
|
||||
// Float version.
|
||||
// Basically replace int with float and divide all constants by 31.
|
||||
float R_DoomLightingEquation(float light, float dist)
|
||||
{
|
||||
/* L in the range 0 to 63 */
|
||||
float L = light * 63.0/31.0;
|
||||
|
||||
float min_L = clamp(36.0/31.0 - L, 0.0, 1.0);
|
||||
|
||||
// Fix objects getting totally black when close.
|
||||
if (dist < 0.0001)
|
||||
dist = 0.0001;
|
||||
|
||||
float scale = 1.0 / dist;
|
||||
float index = (59.0/31.0 - L) - (scale * DOOMLIGHTFACTOR/31.0 - DOOMLIGHTFACTOR/31.0);
|
||||
|
||||
/* result is colormap index (0 bright .. 31 dark) */
|
||||
return clamp(index, min_L, 1.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Desaturate a color
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
vec4 desaturate(vec4 texel)
|
||||
{
|
||||
#ifndef NO_DESATURATE
|
||||
float gray = (texel.r * 0.3 + texel.g * 0.56 + texel.b * 0.14);
|
||||
return mix (vec4(gray,gray,gray,texel.a), texel, desaturation_factor);
|
||||
#else
|
||||
return texel;
|
||||
#endif
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Calculate light
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
vec4 getLightColor(float fogdist, float fogfactor)
|
||||
{
|
||||
vec4 color = gl_Color;
|
||||
#ifdef SOFTLIGHT
|
||||
float newlightlevel = 1.0 - R_DoomLightingEquation(lightlevel, gl_FragCoord.z);
|
||||
color.rgb *= clamp(vec3(newlightlevel) + dlightcolor, 0.0, 1.0);
|
||||
#endif
|
||||
#ifndef NO_FOG
|
||||
//
|
||||
// apply light diminishing
|
||||
//
|
||||
if (fogenabled > 0)
|
||||
{
|
||||
#if (!defined(NO_SM4) || defined(DOOMLIGHT)) && !defined SOFTLIGHT
|
||||
// special lighting mode 'Doom' not available on older cards for performance reasons.
|
||||
if (fogdist < fogparm.y)
|
||||
{
|
||||
color.rgb *= fogparm.x - (fogdist / fogparm.y) * (fogparm.x - 1.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
//color = vec4(color.rgb * (1.0 - fogfactor), color.a);
|
||||
color.rgb = mix(vec3(0.0, 0.0, 0.0), color.rgb, fogfactor);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_GLOW
|
||||
//
|
||||
// handle glowing walls
|
||||
//
|
||||
if (topglowcolor.a > 0.0 && glowdist.x < topglowcolor.a)
|
||||
{
|
||||
color.rgb += desaturate(topglowcolor * (1.0 - glowdist.x / topglowcolor.a)).rgb;
|
||||
}
|
||||
if (bottomglowcolor.a > 0.0 && glowdist.y < bottomglowcolor.a)
|
||||
{
|
||||
color.rgb += desaturate(bottomglowcolor * (1.0 - glowdist.y / bottomglowcolor.a)).rgb;
|
||||
}
|
||||
color = min(color, 1.0);
|
||||
#endif
|
||||
|
||||
// calculation of actual light color is complete.
|
||||
return color;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Gets a texel and performs common manipulations
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
vec4 getTexel(vec2 st)
|
||||
{
|
||||
vec4 texel = texture2D(tex, st);
|
||||
|
||||
#ifndef NO_TEXTUREMODE
|
||||
//
|
||||
// Apply texture modes
|
||||
//
|
||||
if (texturemode == 2)
|
||||
{
|
||||
texel.a = 1.0;
|
||||
}
|
||||
else if (texturemode == 1)
|
||||
{
|
||||
texel.rgb = vec3(1.0,1.0,1.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
return desaturate(texel);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Applies colored fog
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
#ifndef NO_FOG
|
||||
vec4 applyFog(vec4 frag, float fogfactor)
|
||||
{
|
||||
return vec4(mix(fogcolor.rgb, frag.rgb, fogfactor), frag.a);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Main shader routine
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void main()
|
||||
{
|
||||
float fogdist = 0.0;
|
||||
float fogfactor = 0.0;
|
||||
|
||||
#ifdef DYNLIGHT
|
||||
vec4 dynlight = vec4(0.0,0.0,0.0,0.0);
|
||||
vec4 addlight = vec4(0.0,0.0,0.0,0.0);
|
||||
#endif
|
||||
|
||||
#ifndef NO_FOG
|
||||
//
|
||||
// calculate fog factor
|
||||
//
|
||||
if (fogenabled != 0)
|
||||
{
|
||||
#ifndef NO_SM4
|
||||
if (fogenabled == 1 || fogenabled == -1)
|
||||
{
|
||||
fogdist = pixelpos.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
fogdist = max(16.0, distance(pixelpos.xyz, camerapos));
|
||||
}
|
||||
#elif !defined(FOG_RADIAL)
|
||||
fogdist = pixelpos.w;
|
||||
#else
|
||||
fogdist = max(16.0, distance(pixelpos.xyz, camerapos));
|
||||
#endif
|
||||
fogfactor = exp2 (fogparm.z * fogdist);
|
||||
}
|
||||
#endif
|
||||
|
||||
vec4 frag = getLightColor(fogdist, fogfactor);
|
||||
|
||||
|
||||
#ifdef DYNLIGHT
|
||||
for(int i=0; i<lightrange.x; i+=2)
|
||||
{
|
||||
vec4 lightpos = lights[i];
|
||||
vec4 lightcolor = lights[i+1];
|
||||
|
||||
lightcolor.rgb *= max(lightpos.w - distance(pixelpos.xyz, lightpos.xyz),0.0) / lightpos.w;
|
||||
dynlight += lightcolor;
|
||||
}
|
||||
for(int i=lightrange.x; i<lightrange.y; i+=2)
|
||||
{
|
||||
vec4 lightpos = lights[i];
|
||||
vec4 lightcolor = lights[i+1];
|
||||
|
||||
lightcolor.rgb *= max(lightpos.w - distance(pixelpos.xyz, lightpos.xyz),0.0) / lightpos.w;
|
||||
dynlight -= lightcolor;
|
||||
}
|
||||
for(int i=lightrange.y; i<lightrange.z; i+=2)
|
||||
{
|
||||
vec4 lightpos = lights[i];
|
||||
vec4 lightcolor = lights[i+1];
|
||||
|
||||
lightcolor.rgb *= max(lightpos.w - distance(pixelpos.xyz, lightpos.xyz),0.0) / lightpos.w;
|
||||
addlight += lightcolor;
|
||||
}
|
||||
frag.rgb = clamp(frag.rgb + dynlight.rgb, 0.0, 1.4);
|
||||
#endif
|
||||
|
||||
frag = Process(frag);
|
||||
|
||||
#ifdef DYNLIGHT
|
||||
frag.rgb += addlight.rgb;
|
||||
#endif
|
||||
|
||||
#ifndef NO_FOG
|
||||
if (fogenabled < 0)
|
||||
{
|
||||
frag = applyFog(frag, fogfactor);
|
||||
}
|
||||
#endif
|
||||
gl_FragColor = frag;
|
||||
}
|
75
wadsrc/static/shaders/glsl/main.vp
Normal file
75
wadsrc/static/shaders/glsl/main.vp
Normal file
|
@ -0,0 +1,75 @@
|
|||
#ifndef NO_FOG
|
||||
varying vec4 pixelpos;
|
||||
attribute vec4 fogparams;
|
||||
varying vec4 fogparm;
|
||||
#endif
|
||||
#ifndef NO_GLOW
|
||||
varying vec2 glowdist;
|
||||
attribute vec2 glowdistance;
|
||||
#endif
|
||||
|
||||
#ifdef SOFTLIGHT
|
||||
attribute float lightlevel_in;
|
||||
varying float lightlevel;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
#ifdef SOFTLIGHT
|
||||
lightlevel = lightlevel_in;
|
||||
#endif
|
||||
|
||||
#ifndef NO_SM4
|
||||
// Yes, I know... But using a texture matrix here saves me from the hassle of tracking its state across shaders. ;)
|
||||
vec4 worldcoord = gl_TextureMatrix[7] * gl_Vertex;
|
||||
#else
|
||||
vec4 worldcoord = gl_Vertex;
|
||||
#endif
|
||||
vec4 eyeCoordPos = gl_ModelViewMatrix * worldcoord;
|
||||
|
||||
gl_FrontColor = gl_Color;
|
||||
|
||||
#ifndef NO_FOG
|
||||
pixelpos.xyz = worldcoord.xyz;
|
||||
pixelpos.w = -eyeCoordPos.z/eyeCoordPos.w;
|
||||
fogparm = fogparams;
|
||||
#endif
|
||||
|
||||
#ifndef NO_GLOW
|
||||
glowdist = glowdistance;
|
||||
#endif
|
||||
|
||||
#ifdef SPHEREMAP
|
||||
vec3 u = normalize(eyeCoordPos.xyz);
|
||||
vec3 n = normalize(gl_NormalMatrix * gl_Normal);
|
||||
vec3 r = reflect(u, n);
|
||||
float m = 2.0 * sqrt( r.x*r.x + r.y*r.y + (r.z+1.0)*(r.z+1.0) );
|
||||
vec2 sst = vec2(r.x/m + 0.5, r.y/m + 0.5);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SPHEREMAP_0
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
#else
|
||||
gl_TexCoord[0].xy = sst;
|
||||
#endif
|
||||
|
||||
/* only for reference purposes. I don't think this will ever get used.
|
||||
#ifdef NUM_LAYERS
|
||||
#ifndef SPHEREMAP_1
|
||||
gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord0;
|
||||
#else
|
||||
gl_TexCoord[1].xy = sst;
|
||||
#endif
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifndef NO_SM4
|
||||
gl_Position = gl_ModelViewProjectionMatrix * worldcoord;
|
||||
#else
|
||||
gl_Position = ftransform();
|
||||
#endif
|
||||
#ifdef __GLSL_CG_DATA_TYPES
|
||||
gl_ClipVertex = eyeCoordPos;
|
||||
#endif
|
||||
}
|
46
wadsrc/static/shaders/glsl/main_colormap.fp
Normal file
46
wadsrc/static/shaders/glsl/main_colormap.fp
Normal file
|
@ -0,0 +1,46 @@
|
|||
uniform int texturemode;
|
||||
uniform sampler2D tex;
|
||||
|
||||
uniform vec3 colormapstart;
|
||||
uniform vec3 colormaprange;
|
||||
|
||||
vec4 Process(vec4 color);
|
||||
|
||||
|
||||
vec4 desaturate(vec4 texel)
|
||||
{
|
||||
return texel;
|
||||
}
|
||||
|
||||
vec4 getTexel(vec2 st)
|
||||
{
|
||||
vec4 texel = texture2D(tex, st);
|
||||
|
||||
#ifndef NO_TEXTUREMODE
|
||||
//
|
||||
// Apply texture modes
|
||||
//
|
||||
if (texturemode == 2)
|
||||
{
|
||||
texel.a = 1.0;
|
||||
}
|
||||
else if (texturemode == 1)
|
||||
{
|
||||
texel.rgb = vec3(1.0,1.0,1.0);
|
||||
}
|
||||
#endif
|
||||
|
||||
return texel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 frag = Process(vec4(1.0,1.0,1.0,1.0));
|
||||
|
||||
float gray = (frag.r * 0.3 + frag.g * 0.56 + frag.b * 0.14);
|
||||
vec3 cm = colormapstart + gray * colormaprange;
|
||||
gl_FragColor = vec4(clamp(cm, 0.0, 1.0), frag.a) * gl_Color;
|
||||
}
|
||||
|
Loading…
Reference in a new issue