mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-22 09:40:46 +00:00
Merge branch '497-light-probe-interpolation'
This commit is contained in:
commit
17631b2ab7
149 changed files with 1064 additions and 526 deletions
|
@ -381,7 +381,7 @@ r_useHDR [0 or 1] | Use High Dynamic Range lighting
|
|||
r_hdrAutoExposure [0 or 1] | Adaptive tonemapping with HDR. This allows to have very bright or very dark scenes but the camera will adapt to it so the scene won't loose details
|
||||
r_exposure [0 .. 1] | Default 0.5, Controls brightness and affects HDR exposure key. This is what you change in the video brightness options
|
||||
r_useSSAO [0 .. 1] | Use Screen Space Ambient Occlusion to darken the corners in the scene
|
||||
r_useFilmicPostProcessEffects | Apply several post process effects to mimic a filmic look
|
||||
r_useFilmicPostProcessing | Apply several post process effects to mimic a filmic look
|
||||
|
||||
## Modding Support
|
||||
Name | Description
|
||||
|
|
|
@ -97,6 +97,10 @@ The main goal is that the new content looks the same in RBDOOM-3-BFG as in Blend
|
|||
|
||||
* Added support for Mikkelsen tangent space standard for new assets (thanks to Stephen Pridham)
|
||||
|
||||
* Renamed r_useFilmicPostProcessEffects to r_useFilmicPostProcessing
|
||||
|
||||
* Replaced Motion Blur System Option with Filmic VFX (r_useFilmicPostProcessing)
|
||||
|
||||
|
||||
|
||||
_______________________________________
|
||||
|
|
|
@ -7,22 +7,121 @@ return
|
|||
"BRDF.inc.hlsl",
|
||||
|
||||
-- shaders
|
||||
"ambient_lighting.ps.hlsl",
|
||||
"ambient_lighting.vs.hlsl",
|
||||
"ambient_lighting_IBL.ps.hlsl",
|
||||
"ambient_lighting_IBL.vs.hlsl",
|
||||
"AmbientOcclusion_AO.ps.hlsl",
|
||||
"AmbientOcclusion_AO.vs.hlsl",
|
||||
"AmbientOcclusion_blur.ps.hlsl",
|
||||
"AmbientOcclusion_blur.vs.hlsl",
|
||||
"AmbientOcclusion_minify.ps.hlsl",
|
||||
"AmbientOcclusion_minify.vs.hlsl",
|
||||
"bink.ps.hlsl",
|
||||
"bink.vs.hlsl",
|
||||
"bink_gui.ps.hlsl",
|
||||
"bink_gui.vs.hlsl",
|
||||
"blendLight.ps.hlsl",
|
||||
"blendLight.vs.hlsl",
|
||||
"builtin/debug/debug_shadowmap.ps.hlsl",
|
||||
"builtin/debug/debug_shadowmap.vs.hlsl",
|
||||
"builtin/debug/shadowDebug.ps.hlsl",
|
||||
"builtin/debug/shadowDebug.vs.hlsl",
|
||||
"builtin/debug/shadowDebug_skinned.ps.hlsl",
|
||||
"builtin/debug/shadowDebug_skinned.vs.hlsl",
|
||||
"builtin/debug/octahedron.ps.hlsl",
|
||||
"builtin/debug/octahedron.vs.hlsl",
|
||||
|
||||
"builtin/fog/blendLight.ps.hlsl",
|
||||
"builtin/fog/blendLight.vs.hlsl",
|
||||
"builtin/fog/fog.ps.hlsl",
|
||||
"builtin/fog/fog.vs.hlsl",
|
||||
"builtin/fog/fog_skinned.ps.hlsl",
|
||||
"builtin/fog/fog_skinned.vs.hlsl",
|
||||
|
||||
"builtin/legacy/bumpyenvironment.ps.hlsl",
|
||||
"builtin/legacy/bumpyenvironment.vs.hlsl",
|
||||
"builtin/legacy/bumpyenvironment_skinned.ps.hlsl",
|
||||
"builtin/legacy/bumpyenvironment_skinned.vs.hlsl",
|
||||
"builtin/legacy/environment.ps.hlsl",
|
||||
"builtin/legacy/environment.vs.hlsl",
|
||||
"builtin/legacy/environment_skinned.ps.hlsl",
|
||||
"builtin/legacy/environment_skinned.vs.hlsl",
|
||||
"builtin/legacy/skybox.ps.hlsl",
|
||||
"builtin/legacy/skybox.vs.hlsl",
|
||||
"builtin/legacy/wobblesky.ps.hlsl",
|
||||
"builtin/legacy/wobblesky.vs.hlsl",
|
||||
|
||||
"builtin/lighting/ambient_lighting.ps.hlsl",
|
||||
"builtin/lighting/ambient_lighting.vs.hlsl",
|
||||
"builtin/lighting/ambient_lighting_IBL.ps.hlsl",
|
||||
"builtin/lighting/ambient_lighting_IBL.vs.hlsl",
|
||||
"builtin/lighting/interaction.ps.hlsl",
|
||||
"builtin/lighting/interaction.vs.hlsl",
|
||||
"builtin/lighting/interactionAmbient.ps.hlsl",
|
||||
"builtin/lighting/interactionAmbient.vs.hlsl",
|
||||
"builtin/lighting/interactionAmbient_skinned.ps.hlsl",
|
||||
"builtin/lighting/interactionAmbient_skinned.vs.hlsl",
|
||||
"builtin/lighting/interactionSM.ps.hlsl",
|
||||
"builtin/lighting/interactionSM.vs.hlsl",
|
||||
"builtin/lighting/shadow.ps.hlsl",
|
||||
"builtin/lighting/shadow.vs.hlsl",
|
||||
"builtin/lighting/shadow_skinned.ps.hlsl",
|
||||
"builtin/lighting/shadow_skinned.vs.hlsl",
|
||||
|
||||
"builtin/post/fxaa.ps.hlsl",
|
||||
"builtin/post/fxaa.vs.hlsl",
|
||||
"builtin/post/hdr_glare_chromatic.ps.hlsl",
|
||||
"builtin/post/hdr_glare_chromatic.vs.hlsl",
|
||||
"builtin/post/motionBlur.ps.hlsl",
|
||||
"builtin/post/motionBlur.vs.hlsl",
|
||||
"builtin/post/postprocess.ps.hlsl",
|
||||
"builtin/post/postprocess.vs.hlsl",
|
||||
"builtin/post/screen.ps.hlsl",
|
||||
"builtin/post/screen.vs.hlsl",
|
||||
"builtin/post/SMAA_blending_weight_calc.ps.hlsl",
|
||||
"builtin/post/SMAA_blending_weight_calc.vs.hlsl",
|
||||
"builtin/post/SMAA_edge_detection.ps.hlsl",
|
||||
"builtin/post/SMAA_edge_detection.vs.hlsl",
|
||||
"builtin/post/SMAA_final.ps.hlsl",
|
||||
"builtin/post/SMAA_final.vs.hlsl",
|
||||
"builtin/post/tonemap.ps.hlsl",
|
||||
"builtin/post/tonemap.vs.hlsl",
|
||||
|
||||
"builtin/SSAO/AmbientOcclusion_AO.ps.hlsl",
|
||||
"builtin/SSAO/AmbientOcclusion_AO.vs.hlsl",
|
||||
"builtin/SSAO/AmbientOcclusion_blur.ps.hlsl",
|
||||
"builtin/SSAO/AmbientOcclusion_blur.vs.hlsl",
|
||||
"builtin/SSAO/AmbientOcclusion_minify.ps.hlsl",
|
||||
"builtin/SSAO/AmbientOcclusion_minify.vs.hlsl",
|
||||
|
||||
"builtin/SSGI/DeepGBufferRadiosity_radiosity.ps.hlsl",
|
||||
"builtin/SSGI/DeepGBufferRadiosity_radiosity.vs.hlsl",
|
||||
"builtin/SSGI/DeepGBufferRadiosity_blur.ps.hlsl",
|
||||
"builtin/SSGI/DeepGBufferRadiosity_blur.vs.hlsl",
|
||||
|
||||
"builtin/video/bink.ps.hlsl",
|
||||
"builtin/video/bink.vs.hlsl",
|
||||
"builtin/video/bink_gui.ps.hlsl",
|
||||
"builtin/video/bink_gui.vs.hlsl",
|
||||
|
||||
"builtin/VR/stereoDeGhost.ps.hlsl",
|
||||
"builtin/VR/stereoDeGhost.vs.hlsl",
|
||||
"builtin/VR/stereoInterlace.ps.hlsl",
|
||||
"builtin/VR/stereoInterlace.vs.hlsl",
|
||||
"builtin/VR/stereoWarp.ps.hlsl",
|
||||
"builtin/VR/stereoWarp.vs.hlsl",
|
||||
|
||||
"builtin/color.ps.hlsl",
|
||||
"builtin/color.vs.hlsl",
|
||||
|
||||
"builtin/depth.ps.hlsl",
|
||||
"builtin/depth.vs.hlsl",
|
||||
"builtin/depth_skinned.ps.hlsl",
|
||||
"builtin/depth_skinned.vs.hlsl",
|
||||
|
||||
"builtin/gbuffer.ps.hlsl",
|
||||
"builtin/gbuffer.vs.hlsl",
|
||||
"builtin/gui.ps.hlsl",
|
||||
"builtin/gui.vs.hlsl",
|
||||
|
||||
"builtin/texture.ps.hlsl",
|
||||
"builtin/texture.vs.hlsl",
|
||||
"builtin/texture_color.ps.hlsl",
|
||||
"builtin/texture_color.vs.hlsl",
|
||||
"builtin/texture_color_skinned.ps.hlsl",
|
||||
"builtin/texture_color_skinned.vs.hlsl",
|
||||
"builtin/texture_color_texgen.ps.hlsl",
|
||||
"builtin/texture_color_texgen.vs.hlsl",
|
||||
|
||||
"builtin/vertex_color.ps.hlsl",
|
||||
"builtin/vertex_color.vs.hlsl",
|
||||
|
||||
-- optional shaders required by game materials
|
||||
"bloodorb1_capture.ps.hlsl",
|
||||
"bloodorb1_capture.vs.hlsl",
|
||||
"bloodorb2_capture.ps.hlsl",
|
||||
|
@ -31,102 +130,16 @@ return
|
|||
"bloodorb3_capture.vs.hlsl",
|
||||
"bloodorb_draw.ps.hlsl",
|
||||
"bloodorb_draw.vs.hlsl",
|
||||
"bumpyenvironment.ps.hlsl",
|
||||
"bumpyenvironment.vs.hlsl",
|
||||
"bumpyenvironment_skinned.ps.hlsl",
|
||||
"bumpyenvironment_skinned.vs.hlsl",
|
||||
"color.ps.hlsl",
|
||||
"color.vs.hlsl",
|
||||
"colorProcess.ps.hlsl",
|
||||
"colorProcess.vs.hlsl",
|
||||
"DeepGBufferRadiosity_radiosity.ps.hlsl",
|
||||
"DeepGBufferRadiosity_radiosity.vs.hlsl",
|
||||
"DeepGBufferRadiosity_blur.ps.hlsl",
|
||||
"DeepGBufferRadiosity_blur.vs.hlsl",
|
||||
"debug_shadowmap.ps.hlsl",
|
||||
"debug_shadowmap.vs.hlsl",
|
||||
"depth.ps.hlsl",
|
||||
"depth.vs.hlsl",
|
||||
"depth_skinned.ps.hlsl",
|
||||
"depth_skinned.vs.hlsl",
|
||||
"enviroSuit.ps.hlsl",
|
||||
"enviroSuit.vs.hlsl",
|
||||
"environment.ps.hlsl",
|
||||
"environment.vs.hlsl",
|
||||
"environment_skinned.ps.hlsl",
|
||||
"environment_skinned.vs.hlsl",
|
||||
"fog.ps.hlsl",
|
||||
"fog.vs.hlsl",
|
||||
"fog_skinned.ps.hlsl",
|
||||
"fog_skinned.vs.hlsl",
|
||||
"fxaa.ps.hlsl",
|
||||
"fxaa.vs.hlsl",
|
||||
"gbuffer.ps.hlsl",
|
||||
"gbuffer.vs.hlsl",
|
||||
"gui.ps.hlsl",
|
||||
"gui.vs.hlsl",
|
||||
"hdr_glare_chromatic.ps.hlsl",
|
||||
"hdr_glare_chromatic.vs.hlsl",
|
||||
"heatHazeWithMask.ps.hlsl",
|
||||
"heatHazeWithMask.vs.hlsl",
|
||||
"heatHazeWithMaskAndVertex.ps.hlsl",
|
||||
"heatHazeWithMaskAndVertex.vs.hlsl",
|
||||
"heathaze.ps.hlsl",
|
||||
"heathaze.vs.hlsl",
|
||||
"interaction.ps.hlsl",
|
||||
"interaction.vs.hlsl",
|
||||
"interactionAmbient.ps.hlsl",
|
||||
"interactionAmbient.vs.hlsl",
|
||||
"interactionAmbient_skinned.ps.hlsl",
|
||||
"interactionAmbient_skinned.vs.hlsl",
|
||||
"interactionSM.ps.hlsl",
|
||||
"interactionSM.vs.hlsl",
|
||||
"motionBlur.ps.hlsl",
|
||||
"motionBlur.vs.hlsl",
|
||||
"postprocess.ps.hlsl",
|
||||
"postprocess.vs.hlsl",
|
||||
"screen.ps.hlsl",
|
||||
"screen.vs.hlsl",
|
||||
"shadow.ps.hlsl",
|
||||
"shadow.vs.hlsl",
|
||||
"shadowDebug.ps.hlsl",
|
||||
"shadowDebug.vs.hlsl",
|
||||
"shadowDebug_skinned.ps.hlsl",
|
||||
"shadowDebug_skinned.vs.hlsl",
|
||||
"shadow_skinned.ps.hlsl",
|
||||
"shadow_skinned.vs.hlsl",
|
||||
"simpleshade.ps.hlsl",
|
||||
"simpleshade.vs.hlsl",
|
||||
"skybox.ps.hlsl",
|
||||
"skybox.vs.hlsl",
|
||||
"SMAA_blending_weight_calc.ps.hlsl",
|
||||
"SMAA_blending_weight_calc.vs.hlsl",
|
||||
"SMAA_edge_detection.ps.hlsl",
|
||||
"SMAA_edge_detection.vs.hlsl",
|
||||
"SMAA_final.ps.hlsl",
|
||||
"SMAA_final.vs.hlsl",
|
||||
"stereoDeGhost.ps.hlsl",
|
||||
"stereoDeGhost.vs.hlsl",
|
||||
"stereoInterlace.ps.hlsl",
|
||||
"stereoInterlace.vs.hlsl",
|
||||
"stereoWarp.ps.hlsl",
|
||||
"stereoWarp.vs.hlsl",
|
||||
"texture.ps.hlsl",
|
||||
"texture.vs.hlsl",
|
||||
"texture_color.ps.hlsl",
|
||||
"texture_color.vs.hlsl",
|
||||
"texture_color_skinned.ps.hlsl",
|
||||
"texture_color_skinned.vs.hlsl",
|
||||
"texture_color_texgen.ps.hlsl",
|
||||
"texture_color_texgen.vs.hlsl",
|
||||
"tonemap.ps.hlsl",
|
||||
"tonemap.vs.hlsl",
|
||||
"vertex_color.ps.hlsl",
|
||||
"vertex_color.vs.hlsl",
|
||||
"wobblesky.ps.hlsl",
|
||||
"wobblesky.vs.hlsl",
|
||||
"zcullReconstruct.ps.hlsl",
|
||||
"zcullReconstruct.vs.hlsl",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); //_accum
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform float4 rpUser0 : register( c128 ); //rpCenterScale
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); //_accum
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform float4 rpUser0 : register( c128 ); //rpCenterScaleTex0
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); //_accum
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform float4 rpUser0 : register( c128 ); //rpCenterScaleTex
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); //_accum
|
||||
|
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
|
||||
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN
|
|
@ -16,7 +16,8 @@
|
|||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register( s0 ); // view normals
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN
|
|
@ -15,7 +15,8 @@
|
|||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register( s0 ); // zbuffer
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN
|
|
@ -16,7 +16,8 @@
|
|||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register( s0 ); // view normals
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// #version 120 // -*- c++ -*-
|
||||
// #extension GL_EXT_gpu_shader4 : require
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#if defined(USE_GPU_SKINNING)
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2DArray samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2020 Robert Beckebans
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
@ -26,17 +27,38 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct PS_OUT {
|
||||
float depth : DEPTH;
|
||||
uniform sampler2D samp0 : register(s0); // texture 0 is octahedron cube map
|
||||
|
||||
struct PS_IN {
|
||||
float4 position : VPOS;
|
||||
float3 texcoord0 : TEXCOORD0_centroid;
|
||||
float3 texcoord1 : TEXCOORD1_centroid;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
struct PS_OUT {
|
||||
float4 color : COLOR;
|
||||
};
|
||||
// *INDENT-ON*
|
||||
|
||||
void main( out PS_OUT result )
|
||||
void main( PS_IN fragment, out PS_OUT result )
|
||||
{
|
||||
result.depth = 1;
|
||||
result.color = float4( 0.0, 0.0, 0.0, 0.0 );
|
||||
}
|
||||
|
||||
float3 globalNormal = normalize( fragment.texcoord1 );
|
||||
float3 globalEye = normalize( fragment.texcoord0 );
|
||||
|
||||
float3 reflectionVector = _float3( dot3( globalEye, globalNormal ) );
|
||||
reflectionVector *= globalNormal;
|
||||
reflectionVector = ( reflectionVector * 2.0f ) - globalEye;
|
||||
|
||||
float2 normalizedOctCoord = octEncode( reflectionVector );
|
||||
float2 normalizedOctCoordZeroOne = ( normalizedOctCoord + float2( 1.0 ) ) * 0.5;
|
||||
|
||||
float4 envMap = tex2D( samp0, normalizedOctCoordZeroOne );
|
||||
|
||||
result.color = float4( sRGBToLinearRGB( envMap.xyz ), 1.0f ) * fragment.color;
|
||||
}
|
120
base/renderprogs/builtin/debug/octahedron.vs.hlsl
Normal file
120
base/renderprogs/builtin/debug/octahedron.vs.hlsl
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2020 Robert Beckebans
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float4 color2 : COLOR1;
|
||||
};
|
||||
|
||||
struct VS_OUT {
|
||||
float4 position : POSITION;
|
||||
float3 texcoord0 : TEXCOORD0;
|
||||
float3 texcoord1 : TEXCOORD1;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
// *INDENT-ON*
|
||||
|
||||
void main( VS_IN vertex, out VS_OUT result )
|
||||
{
|
||||
float4 vNormal = vertex.normal * 2.0 - 1.0;
|
||||
|
||||
#if defined( USE_GPU_SKINNING )
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// GPU transformation of the normal / binormal / bitangent
|
||||
//
|
||||
// multiplying with 255.1 give us the same result and is faster than floor( w * 255 + 0.5 )
|
||||
//--------------------------------------------------------------
|
||||
const float w0 = vertex.color2.x;
|
||||
const float w1 = vertex.color2.y;
|
||||
const float w2 = vertex.color2.z;
|
||||
const float w3 = vertex.color2.w;
|
||||
|
||||
float4 matX, matY, matZ; // must be float4 for vec4
|
||||
int joint = int( vertex.color.x * 255.1 * 3.0 );
|
||||
matX = matrices[int( joint + 0 )] * w0;
|
||||
matY = matrices[int( joint + 1 )] * w0;
|
||||
matZ = matrices[int( joint + 2 )] * w0;
|
||||
|
||||
joint = int( vertex.color.y * 255.1 * 3.0 );
|
||||
matX += matrices[int( joint + 0 )] * w1;
|
||||
matY += matrices[int( joint + 1 )] * w1;
|
||||
matZ += matrices[int( joint + 2 )] * w1;
|
||||
|
||||
joint = int( vertex.color.z * 255.1 * 3.0 );
|
||||
matX += matrices[int( joint + 0 )] * w2;
|
||||
matY += matrices[int( joint + 1 )] * w2;
|
||||
matZ += matrices[int( joint + 2 )] * w2;
|
||||
|
||||
joint = int( vertex.color.w * 255.1 * 3.0 );
|
||||
matX += matrices[int( joint + 0 )] * w3;
|
||||
matY += matrices[int( joint + 1 )] * w3;
|
||||
matZ += matrices[int( joint + 2 )] * w3;
|
||||
|
||||
float3 normal;
|
||||
normal.x = dot3( matX, vNormal );
|
||||
normal.y = dot3( matY, vNormal );
|
||||
normal.z = dot3( matZ, vNormal );
|
||||
normal = normalize( normal );
|
||||
|
||||
float4 modelPosition;
|
||||
modelPosition.x = dot4( matX, vertex.position );
|
||||
modelPosition.y = dot4( matY, vertex.position );
|
||||
modelPosition.z = dot4( matZ, vertex.position );
|
||||
modelPosition.w = 1.0;
|
||||
|
||||
#else
|
||||
|
||||
float4 modelPosition = vertex.position;
|
||||
float4 normal = vNormal;
|
||||
|
||||
#endif
|
||||
|
||||
result.position.x = dot4( modelPosition, rpMVPmatrixX );
|
||||
result.position.y = dot4( modelPosition, rpMVPmatrixY );
|
||||
result.position.z = dot4( modelPosition, rpMVPmatrixZ );
|
||||
result.position.w = dot4( modelPosition, rpMVPmatrixW );
|
||||
|
||||
float4 toEye = rpLocalViewOrigin - vertex.position;
|
||||
|
||||
result.texcoord0 = toEye.xyz;
|
||||
result.texcoord1 = normal.xyz;
|
||||
|
||||
result.color = sRGBAToLinearRGBA( rpColor );
|
||||
}
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
||||
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
||||
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
||||
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // normal map
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#if defined( USE_GPU_SKINNING )
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform samplerCUBE samp0 : register(s0); // texture 0 is the cube map
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform samplerCUBE samp0 : register(s0); // texture 0 is the cube map
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform samplerCUBE samp0 : register(s0); // texture 0 is the cube map
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform samplerCUBE samp0 : register(s0); // texture 0 is the cube map
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
||||
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform samplerCUBE samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform samplerCUBE samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 1 is the per-surface normal map
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#if defined( USE_GPU_SKINNING )
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -27,8 +27,10 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "BRDF.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
#include "renderprogs/BRDF.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 0 is the per-surface normal map
|
||||
|
@ -37,8 +39,8 @@ uniform sampler2D samp2 : register(s2); // texture 2 is the per-surface baseColo
|
|||
uniform sampler2D samp3 : register(s3); // texture 3 is the BRDF LUT
|
||||
uniform sampler2D samp4 : register(s4); // texture 4 is SSAO
|
||||
|
||||
uniform samplerCUBE samp7 : register(s7); // texture 7 is the irradiance cube map
|
||||
uniform samplerCUBE samp8 : register(s8); // texture 8 is the radiance cube map
|
||||
uniform sampler2D samp7 : register(s7); // texture 7 is the irradiance cube map
|
||||
uniform sampler2D samp8 : register(s8); // texture 8 is the radiance cube map
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
|
@ -59,6 +61,7 @@ struct PS_OUT
|
|||
};
|
||||
// *INDENT-ON*
|
||||
|
||||
|
||||
void main( PS_IN fragment, out PS_OUT result )
|
||||
{
|
||||
half4 bumpMap = tex2D( samp0, fragment.texcoord0.xy );
|
||||
|
@ -81,11 +84,12 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
globalNormal.x = dot3( localNormal, fragment.texcoord4 );
|
||||
globalNormal.y = dot3( localNormal, fragment.texcoord5 );
|
||||
globalNormal.z = dot3( localNormal, fragment.texcoord6 );
|
||||
globalNormal = normalize( globalNormal );
|
||||
|
||||
float3 globalEye = normalize( fragment.texcoord3.xyz );
|
||||
|
||||
float3 reflectionVector = globalNormal * dot3( globalEye, globalNormal );
|
||||
reflectionVector = ( reflectionVector * 2.0f ) - globalEye;
|
||||
reflectionVector = normalize( ( reflectionVector * 2.0f ) - globalEye );
|
||||
|
||||
half vDotN = saturate( dot3( globalEye, globalNormal ) );
|
||||
|
||||
|
@ -150,7 +154,10 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
|
||||
// evaluate diffuse IBL
|
||||
|
||||
float3 irradiance = texCUBE( samp7, globalNormal ).rgb;
|
||||
float2 normalizedOctCoord = octEncode( globalNormal );
|
||||
float2 normalizedOctCoordZeroOne = ( normalizedOctCoord + float2( 1.0 ) ) * 0.5;
|
||||
|
||||
float3 irradiance = tex2D( samp7, normalizedOctCoordZeroOne ).rgb;
|
||||
float3 diffuseLight = ( kD * irradiance * diffuseColor ) * ao * ( rpDiffuseModifier.xyz * 1.0 );
|
||||
|
||||
// evaluate specular IBL
|
||||
|
@ -159,7 +166,12 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
const float MAX_REFLECTION_LOD = 10.0;
|
||||
float mip = clamp( ( roughness * MAX_REFLECTION_LOD ), 0.0, MAX_REFLECTION_LOD );
|
||||
//float mip = 0.0;
|
||||
float3 radiance = textureLod( samp8, reflectionVector, mip ).rgb;
|
||||
|
||||
normalizedOctCoord = octEncode( reflectionVector );
|
||||
normalizedOctCoordZeroOne = ( normalizedOctCoord + float2( 1.0 ) ) * 0.5;
|
||||
|
||||
float3 radiance = textureLod( samp8, normalizedOctCoordZeroOne, mip ).rgb;
|
||||
//radiance = float3( 0.0 );
|
||||
|
||||
float2 envBRDF = texture( samp3, float2( max( vDotN, 0.0 ), roughness ) ).rg;
|
||||
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#if defined( USE_GPU_SKINNING )
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -27,8 +27,10 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "BRDF.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
#include "renderprogs/BRDF.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 1 is the per-surface normal map
|
||||
|
@ -103,7 +105,7 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
const half roughness = specMapSRGB.r;
|
||||
const half glossiness = 1.0 - roughness;
|
||||
|
||||
// the vast majority of real-world materials (anything not metal or gems) have F(0°)
|
||||
// the vast majority of real-world materials (anything not metal or gems) have F(0<EFBFBD>)
|
||||
// values in a very narrow range (~0.02 - 0.08)
|
||||
|
||||
// approximate non-metals with linear RGB 0.04 which is 0.08 * 0.5 (default in UE4)
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#if defined( USE_GPU_SKINNING )
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 1 is the per-surface normal map
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 1 is the per-surface normal map
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
||||
|
|
@ -28,8 +28,10 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "BRDF.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
#include "renderprogs/BRDF.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 1 is the per-surface normal map
|
||||
|
@ -394,7 +396,7 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
const half roughness = specMapSRGB.r;
|
||||
const half glossiness = 1.0 - roughness;
|
||||
|
||||
// the vast majority of real-world materials (anything not metal or gems) have F(0°)
|
||||
// the vast majority of real-world materials (anything not metal or gems) have F(0<EFBFBD>)
|
||||
// values in a very narrow range (~0.02 - 0.08)
|
||||
|
||||
// approximate non-metals with linear RGB 0.04 which is 0.08 * 0.5 (default in UE4)
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#if defined( USE_GPU_SKINNING )
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform matrices_ubo { float4 matrices[408]; };
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#define SMAA_INCLUDE_VS 0
|
||||
#define SMAA_INCLUDE_PS 1
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#define SMAA_INCLUDE_VS 1
|
||||
#define SMAA_INCLUDE_PS 0
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#define SMAA_INCLUDE_VS 0
|
||||
#define SMAA_INCLUDE_PS 1
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#define SMAA_INCLUDE_VS 1
|
||||
#define SMAA_INCLUDE_PS 0
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#define SMAA_INCLUDE_VS 0
|
||||
#define SMAA_INCLUDE_PS 1
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
#define SMAA_INCLUDE_VS 1
|
||||
#define SMAA_INCLUDE_PS 0
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
#define FXAA_GREEN_AS_LUMA 1
|
||||
#define FXAA_EARLY_EXIT 0
|
||||
#include "Fxaa3_11.h"
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // view color
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -29,7 +29,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -27,7 +27,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0); // texture 0 is _currentRender
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
uniform sampler2D samp0 : register(s0);
|
|
@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "global.inc.hlsl"
|
||||
#include "renderprogs/global.inc.hlsl"
|
||||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue