diff --git a/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs b/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs index 02603ff22..5dbacd2e3 100644 --- a/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs +++ b/Templates/BaseGame/game/core/lighting/advanced/deferredShading.cs @@ -35,6 +35,7 @@ new GFXStateBlockData( AL_DeferredShadingState : PFX_DefaultStateBlock ) samplerStates[1] = SamplerWrapLinear; samplerStates[2] = SamplerWrapLinear; samplerStates[3] = SamplerWrapLinear; + samplerStates[4] = SamplerWrapLinear; }; new ShaderData( AL_DeferredShader ) diff --git a/Templates/BaseGame/game/core/lighting/advanced/init.cs b/Templates/BaseGame/game/core/lighting/advanced/init.cs index 6941138c7..db2175278 100644 --- a/Templates/BaseGame/game/core/lighting/advanced/init.cs +++ b/Templates/BaseGame/game/core/lighting/advanced/init.cs @@ -44,15 +44,6 @@ exec( "./deferredShading.cs" ); function onActivateAdvancedLM() { - // Don't allow the offscreen target on OSX. - if ( $platform $= "macos" ) - return; - - // On the Xbox360 we know what will be enabled so don't do any trickery to - // disable MSAA - if ( $platform $= "xenon" ) - return; - // Enable the offscreen target so that AL will work // with MSAA back buffers and for HDR rendering. AL_FormatToken.enable(); diff --git a/Templates/BaseGame/game/core/lighting/advanced/shaders.cs b/Templates/BaseGame/game/core/lighting/advanced/shaders.cs index 3600c5206..a73598d9b 100644 --- a/Templates/BaseGame/game/core/lighting/advanced/shaders.cs +++ b/Templates/BaseGame/game/core/lighting/advanced/shaders.cs @@ -36,7 +36,7 @@ new GFXStateBlockData( AL_VectorLightState ) samplersDefined = true; samplerStates[0] = SamplerClampPoint; // G-buffer - mSamplerNames[0] = "prePassBuffer"; + mSamplerNames[0] = "deferredBuffer"; samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.) mSamplerNames[1] = "shadowMap"; samplerStates[2] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.) @@ -66,7 +66,7 @@ new ShaderData( AL_VectorLightShader ) OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/farFrustumQuadV.glsl"; OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/vectorLightP.glsl"; - samplerNames[0] = "$prePassBuffer"; + samplerNames[0] = "$deferredBuffer"; samplerNames[1] = "$shadowMap"; samplerNames[2] = "$dynamicShadowMap"; samplerNames[3] = "$ssaoMask"; @@ -83,7 +83,7 @@ new CustomMaterial( AL_VectorLightMaterial ) shader = AL_VectorLightShader; stateBlock = AL_VectorLightState; - sampler["prePassBuffer"] = "#deferred"; + sampler["deferredBuffer"] = "#deferred"; sampler["shadowMap"] = "$dynamiclight"; sampler["dynamicShadowMap"] = "$dynamicShadowMap"; sampler["ssaoMask"] = "#ssaoMask"; @@ -114,7 +114,7 @@ new GFXStateBlockData( AL_ConvexLightState ) samplersDefined = true; samplerStates[0] = SamplerClampPoint; // G-buffer - mSamplerNames[0] = "prePassBuffer"; + mSamplerNames[0] = "deferredBuffer"; samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections) mSamplerNames[1] = "shadowMap"; samplerStates[2] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections) @@ -143,7 +143,7 @@ new ShaderData( AL_PointLightShader ) OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl"; OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/pointLightP.glsl"; - samplerNames[0] = "$prePassBuffer"; + samplerNames[0] = "$deferredBuffer"; samplerNames[1] = "$shadowMap"; samplerNames[2] = "$dynamicShadowMap"; samplerNames[3] = "$cookieMap"; @@ -160,7 +160,7 @@ new CustomMaterial( AL_PointLightMaterial ) shader = AL_PointLightShader; stateBlock = AL_ConvexLightState; - sampler["prePassBuffer"] = "#deferred"; + sampler["deferredBuffer"] = "#deferred"; sampler["shadowMap"] = "$dynamiclight"; sampler["dynamicShadowMap"] = "$dynamicShadowMap"; sampler["cookieMap"] = "$dynamiclightmask"; @@ -182,7 +182,7 @@ new ShaderData( AL_SpotLightShader ) OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl"; OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/spotLightP.glsl"; - samplerNames[0] = "$prePassBuffer"; + samplerNames[0] = "$deferredBuffer"; samplerNames[1] = "$shadowMap"; samplerNames[2] = "$dynamicShadowMap"; samplerNames[3] = "$cookieMap"; @@ -199,7 +199,7 @@ new CustomMaterial( AL_SpotLightMaterial ) shader = AL_SpotLightShader; stateBlock = AL_ConvexLightState; - sampler["prePassBuffer"] = "#deferred"; + sampler["deferredBuffer"] = "#deferred"; sampler["shadowMap"] = "$dynamiclight"; sampler["dynamicShadowMap"] = "$dynamicShadowMap"; sampler["cookieMap"] = "$dynamiclightmask"; @@ -259,7 +259,7 @@ new ShaderData( AL_ParticlePointLightShader ) OGLVertexShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/convexGeometryV.glsl"; OGLPixelShaderFile = $Core::CommonShaderPath @ "/lighting/advanced/gl/pointLightP.glsl"; - samplerNames[0] = "$prePassBuffer"; + samplerNames[0] = "$deferredBuffer"; pixVersion = 3.0; }; @@ -269,7 +269,7 @@ new CustomMaterial( AL_ParticlePointLightMaterial ) shader = AL_ParticlePointLightShader; stateBlock = AL_ConvexLightState; - sampler["prePassBuffer"] = "#deferred"; + sampler["deferredBuffer"] = "#deferred"; target = "lightinfo"; pixVersion = 3.0; diff --git a/Templates/BaseGame/game/core/postFX/GammaPostFX.cs b/Templates/BaseGame/game/core/postFX/GammaPostFX.cs index 8562b02b7..293d44714 100644 --- a/Templates/BaseGame/game/core/postFX/GammaPostFX.cs +++ b/Templates/BaseGame/game/core/postFX/GammaPostFX.cs @@ -48,15 +48,14 @@ singleton PostEffect( GammaPostFX ) renderTime = "PFXBeforeBin"; renderBin = "EditorBin"; - renderPriority = 9999; + renderPriority = 9998; shader = GammaShader; stateBlock = GammaStateBlock; texture[0] = "$backBuffer"; texture[1] = $HDRPostFX::colorCorrectionRamp; - - targetFormat = getBestHDRFormat(); + textureSRGB[1] = true; }; function GammaPostFX::preProcess( %this ) diff --git a/Templates/BaseGame/game/core/postFX/hdr.cs b/Templates/BaseGame/game/core/postFX/hdr.cs index b874158eb..837d8e6c8 100644 --- a/Templates/BaseGame/game/core/postFX/hdr.cs +++ b/Templates/BaseGame/game/core/postFX/hdr.cs @@ -273,10 +273,6 @@ function HDRPostFX::preProcess( %this ) function HDRPostFX::onEnabled( %this ) { - // We don't allow hdr on OSX yet. - if ( $platform $= "macos" ) - return false; - // See what HDR format would be best. %format = getBestHDRFormat(); if ( %format $= "" || %format $= "GFXFormatR8G8B8A8" ) diff --git a/Templates/BaseGame/game/core/renderManager.cs b/Templates/BaseGame/game/core/renderManager.cs index f719ad1f0..4a80a45b1 100644 --- a/Templates/BaseGame/game/core/renderManager.cs +++ b/Templates/BaseGame/game/core/renderManager.cs @@ -33,7 +33,8 @@ function initRenderManager() { enabled = "false"; - format = getBestHDRFormat(); + //When hdr is enabled this will be changed to the appropriate format + format = "GFXFormatR8G8B8A8_SRGB"; depthFormat = "GFXFormatD24S8"; aaLevel = 0; // -1 = match backbuffer diff --git a/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogP.hlsl b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogP.hlsl index 9fdf5c882..7de14a87d 100644 --- a/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogP.hlsl +++ b/Templates/BaseGame/game/core/shaders/VolumetricFog/VFogP.hlsl @@ -56,7 +56,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0 float2 uvscreen=((IN.htpos.xy/IN.htpos.w) + 1.0 ) / 2.0; uvscreen.y = 1.0 - uvscreen.y; - float obj_test = TORQUE_PREPASS_UNCONDITION(deferredTex, uvscreen).w * preBias; + float obj_test = TORQUE_DEFERRED_UNCONDITION(deferredTex, uvscreen).w * preBias; float depth = TORQUE_TEX2D(depthBuffer, uvscreen).r; float front = TORQUE_TEX2D(frontBuffer, uvscreen).r; diff --git a/Templates/BaseGame/game/core/shaders/gl/hlslCompat.glsl b/Templates/BaseGame/game/core/shaders/gl/hlslCompat.glsl index c8fe73620..b9a6e76d7 100644 --- a/Templates/BaseGame/game/core/shaders/gl/hlslCompat.glsl +++ b/Templates/BaseGame/game/core/shaders/gl/hlslCompat.glsl @@ -94,8 +94,6 @@ mat4 mat4FromRow( float r0c0, float r0c1, float r0c2, float r0c3, #define tMul(a, b) (a*b) -#define inversesqrt( n ) inversesqrt( n ) - #define correctSSP(vec) vec.y *= -1 #ifdef TORQUE_PIXEL_SHADER diff --git a/Templates/BaseGame/game/core/shaders/gl/particlesP.glsl b/Templates/BaseGame/game/core/shaders/gl/particlesP.glsl index efc3234e0..cf35e5f1b 100644 --- a/Templates/BaseGame/game/core/shaders/gl/particlesP.glsl +++ b/Templates/BaseGame/game/core/shaders/gl/particlesP.glsl @@ -36,7 +36,7 @@ uniform float oneOverFar; uniform sampler2D deferredTex; //uniform vec3 vEye; - uniform vec4 prePassTargetParams; + uniform vec4 deferredTargetParams; #endif #define CLIP_Z // TODO: Make this a proper macro @@ -86,7 +86,7 @@ void main() #ifdef SOFTPARTICLES vec2 tc = IN_pos.xy * vec2(1.0, -1.0) / IN_pos.w; - tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), prePassTargetParams); + tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), deferredTargetParams); float sceneDepth = deferredUncondition( deferredTex, tc ).w; float depth = IN_pos.w * oneOverFar; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl index 28f8eb563..ebd9ed72b 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/deferredShadingP.hlsl @@ -35,7 +35,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 float4 colorBuffer = TORQUE_TEX2D( colorBufferTex, IN.uv0 ); float4 matInfo = TORQUE_TEX2D( matInfoTex, IN.uv0 ); float specular = saturate(lightBuffer.a); - float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w; + float depth = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).w; if (depth>0.9999) return float4(0,0,0,0); diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/pointLightP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/pointLightP.glsl index 9bb3cb727..80869de25 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/pointLightP.glsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/pointLightP.glsl @@ -103,7 +103,7 @@ uniform samplerCube cookieMap ; #endif -uniform sampler2D prePassBuffer; +uniform sampler2D deferredBuffer; #ifdef SHADOW_CUBE uniform samplerCube shadowMap; @@ -159,7 +159,7 @@ void main() } // Sample/unpack the normal/z data - vec4 deferredSample = deferredUncondition( prePassBuffer, uvScene ); + vec4 deferredSample = deferredUncondition( deferredBuffer, uvScene ); vec3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/spotLightP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/spotLightP.glsl index abff1f809..5fcf1b19c 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/spotLightP.glsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/spotLightP.glsl @@ -46,7 +46,7 @@ uniform sampler2D cookieMap; #endif -uniform sampler2D prePassBuffer; +uniform sampler2D deferredBuffer; uniform sampler2D shadowMap; uniform sampler2D dynamicShadowMap; @@ -101,7 +101,7 @@ void main() } // Sample/unpack the normal/z data - vec4 deferredSample = deferredUncondition( prePassBuffer, uvScene ); + vec4 deferredSample = deferredUncondition( deferredBuffer, uvScene ); vec3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/vectorLightP.glsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/vectorLightP.glsl index 977afd9c0..142e58b10 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/vectorLightP.glsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/gl/vectorLightP.glsl @@ -42,7 +42,7 @@ uniform sampler2D ssaoMask ; uniform vec4 rtParams3; #endif -uniform sampler2D prePassBuffer; +uniform sampler2D deferredBuffer; uniform sampler2D lightBuffer; uniform sampler2D colorBuffer; uniform sampler2D matInfoBuffer; @@ -214,7 +214,7 @@ void main() } // Sample/unpack the normal/z data - vec4 deferredSample = deferredUncondition( prePassBuffer, uv0 ); + vec4 deferredSample = deferredUncondition( deferredBuffer, uv0 ); vec3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightP.hlsl index 9eeb52b94..a0156eb85 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/particlePointLightP.hlsl @@ -34,7 +34,7 @@ struct ConvexConnectP float3 vsEyeDir : TEXCOORD1; }; -TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0); +TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0); uniform float4 lightPosition; uniform float4 lightColor; @@ -49,7 +49,7 @@ float4 main( ConvexConnectP IN ) : TORQUE_TARGET0 float2 uvScene = getUVFromSSPos(ssPos, rtParams0); // Sample/unpack the normal/z data - float4 deferredSample = TORQUE_PREPASS_UNCONDITION(prePassBuffer, uvScene); + float4 deferredSample = TORQUE_DEFERRED_UNCONDITION(deferredBuffer, uvScene); float3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/pointLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/pointLightP.hlsl index e5a2a2d89..317feb0b3 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/pointLightP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/pointLightP.hlsl @@ -106,7 +106,7 @@ TORQUE_UNIFORM_SAMPLERCUBE(cookieMap, 3); #endif -TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0); +TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0); #ifdef SHADOW_CUBE TORQUE_UNIFORM_SAMPLERCUBE(shadowMap, 1); @@ -161,7 +161,7 @@ float4 main( ConvexConnectP IN ) : TORQUE_TARGET0 } // Sample/unpack the normal/z data - float4 deferredSample = TORQUE_PREPASS_UNCONDITION( prePassBuffer, uvScene ); + float4 deferredSample = TORQUE_DEFERRED_UNCONDITION( deferredBuffer, uvScene ); float3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/spotLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/spotLightP.hlsl index 5520b1a69..196286dc2 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/spotLightP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/spotLightP.hlsl @@ -38,7 +38,7 @@ struct ConvexConnectP float4 vsEyeDir : TEXCOORD2; }; -TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0); +TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0); TORQUE_UNIFORM_SAMPLER2D(shadowMap, 1); TORQUE_UNIFORM_SAMPLER2D(dynamicShadowMap,2); @@ -99,7 +99,7 @@ float4 main( ConvexConnectP IN ) : TORQUE_TARGET0 } // Sample/unpack the normal/z data - float4 deferredSample = TORQUE_PREPASS_UNCONDITION( prePassBuffer, uvScene ); + float4 deferredSample = TORQUE_DEFERRED_UNCONDITION( deferredBuffer, uvScene ); float3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/lighting/advanced/vectorLightP.hlsl b/Templates/BaseGame/game/core/shaders/lighting/advanced/vectorLightP.hlsl index cbea25cb4..c5efde242 100644 --- a/Templates/BaseGame/game/core/shaders/lighting/advanced/vectorLightP.hlsl +++ b/Templates/BaseGame/game/core/shaders/lighting/advanced/vectorLightP.hlsl @@ -30,7 +30,7 @@ #include "../shadowMap/shadowMapIO_HLSL.h" #include "softShadow.hlsl" -TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0); +TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0); TORQUE_UNIFORM_SAMPLER2D(shadowMap, 1); TORQUE_UNIFORM_SAMPLER2D(dynamicShadowMap, 2); @@ -213,7 +213,7 @@ float4 main( FarFrustumQuadConnectP IN ) : TORQUE_TARGET0 subsurface = float3(0.337255, 0.772549, 0.262745); } // Sample/unpack the normal/z data - float4 deferredSample = TORQUE_PREPASS_UNCONDITION( prePassBuffer, IN.uv0 ); + float4 deferredSample = TORQUE_DEFERRED_UNCONDITION( deferredBuffer, IN.uv0 ); float3 normal = deferredSample.rgb; float depth = deferredSample.a; diff --git a/Templates/BaseGame/game/core/shaders/particlesP.hlsl b/Templates/BaseGame/game/core/shaders/particlesP.hlsl index f393bf512..155107d8b 100644 --- a/Templates/BaseGame/game/core/shaders/particlesP.hlsl +++ b/Templates/BaseGame/game/core/shaders/particlesP.hlsl @@ -35,7 +35,7 @@ uniform float oneOverFar; TORQUE_UNIFORM_SAMPLER2D(deferredTex, 1); //uniform float3 vEye; - uniform float4 prePassTargetParams; + uniform float4 deferredTargetParams; #endif #define CLIP_Z // TODO: Make this a proper macro @@ -82,9 +82,9 @@ float4 main( Conn IN ) : TORQUE_TARGET0 #ifdef SOFTPARTICLES float2 tc = IN.pos.xy * float2(1.0, -1.0) / IN.pos.w; - tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), prePassTargetParams); + tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), deferredTargetParams); - float sceneDepth = TORQUE_PREPASS_UNCONDITION(deferredTex, tc).w; + float sceneDepth = TORQUE_DEFERRED_UNCONDITION(deferredTex, tc).w; float depth = IN.pos.w * oneOverFar; float diff = sceneDepth - depth; #ifdef CLIP_Z diff --git a/Templates/BaseGame/game/core/shaders/postFX/caustics/causticsP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/caustics/causticsP.hlsl index c45376e22..8c8abd480 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/caustics/causticsP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/caustics/causticsP.hlsl @@ -40,10 +40,10 @@ float distanceToPlane(float4 plane, float3 pos) float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 { //Sample the pre-pass - float4 prePass = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ); + float4 deferred = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ); //Get depth - float depth = prePass.w; + float depth = deferred.w; if(depth > 0.9999) return float4(0,0,0,0); @@ -71,7 +71,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 //Use normal Z to modulate caustics //float waterDepth = 1 - saturate(pos.z + waterFogPlane.w + 1); - caustics *= saturate(prePass.z) * pow(abs(1-depth), 64) * waterDepth; + caustics *= saturate(deferred.z) * pow(abs(1-depth), 64) * waterDepth; return caustics; } diff --git a/Templates/BaseGame/game/core/shaders/postFX/caustics/gl/causticsP.glsl b/Templates/BaseGame/game/core/shaders/postFX/caustics/gl/causticsP.glsl index 5d62185dd..d002fd7e1 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/caustics/gl/causticsP.glsl +++ b/Templates/BaseGame/game/core/shaders/postFX/caustics/gl/causticsP.glsl @@ -44,10 +44,10 @@ float distanceToPlane(vec4 plane, vec3 pos) void main() { //Sample the pre-pass - vec4 prePass = deferredUncondition( deferredTex, IN_uv0 ); + vec4 deferred = deferredUncondition( deferredTex, IN_uv0 ); //Get depth - float depth = prePass.w; + float depth = deferred.w; if(depth > 0.9999) { OUT_col = vec4(0,0,0,0); @@ -81,7 +81,7 @@ void main() //Use normal Z to modulate caustics //float waterDepth = 1 - saturate(pos.z + waterFogPlane.w + 1); - caustics *= saturate(prePass.z) * pow(1-depth, 64) * waterDepth; + caustics *= saturate(deferred.z) * pow(1-depth, 64) * waterDepth; OUT_col = caustics; } diff --git a/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_P.hlsl index 8c9028654..907c3d122 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_P.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_DownSample_P.hlsl @@ -88,10 +88,10 @@ half4 main( Pixel IN ) : TORQUE_TARGET0 [unroll] // coc[i] causes this anyway for (int i = 0; i < 4; i++) { - depth[0] = TORQUE_PREPASS_UNCONDITION(depthSampler, (IN.tcDepth0.xy + rowOfs[i])).w; - depth[1] = TORQUE_PREPASS_UNCONDITION(depthSampler, (IN.tcDepth1.xy + rowOfs[i])).w; - depth[2] = TORQUE_PREPASS_UNCONDITION(depthSampler, (IN.tcDepth2.xy + rowOfs[i])).w; - depth[3] = TORQUE_PREPASS_UNCONDITION(depthSampler, (IN.tcDepth3.xy + rowOfs[i])).w; + depth[0] = TORQUE_DEFERRED_UNCONDITION(depthSampler, (IN.tcDepth0.xy + rowOfs[i])).w; + depth[1] = TORQUE_DEFERRED_UNCONDITION(depthSampler, (IN.tcDepth1.xy + rowOfs[i])).w; + depth[2] = TORQUE_DEFERRED_UNCONDITION(depthSampler, (IN.tcDepth2.xy + rowOfs[i])).w; + depth[3] = TORQUE_DEFERRED_UNCONDITION(depthSampler, (IN.tcDepth3.xy + rowOfs[i])).w; coc = max(coc, clamp(dofEqWorld4X * half4(depth)+dofEqWorld4Y, zero4, maxWorldCoC4)); } diff --git a/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_P.hlsl index cb7342d40..9a7cb3d5e 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_P.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/dof/DOF_Final_P.hlsl @@ -71,7 +71,7 @@ half4 InterpolateDof( half3 small, half3 med, half3 large, half t ) // d0, the small to medium blur over distance d1, and the medium to // large blur over distance d2, where d0 + d1 + d2 = 1. //float4 dofLerpScale = float4( -1 / d0, -1 / d1, -1 / d2, 1 / d2 ); - //float4 dofLerpBias = float4( 1, (1 – d2) / d1, 1 / d2, (d2 – 1) / d2 ); + //float4 dofLerpBias = float4( 1, (1 � d2) / d1, 1 / d2, (d2 � 1) / d2 ); weights = half4(saturate( t * dofLerpScale + dofLerpBias )); weights.yz = min( weights.yz, 1 - weights.xy ); @@ -115,7 +115,7 @@ half4 main( PFXVertToPix IN ) : TORQUE_TARGET0 //med.rgb = large; //nearCoc = 0; - depth = half(TORQUE_PREPASS_UNCONDITION( depthSampler, IN.uv3 ).w); + depth = half(TORQUE_DEFERRED_UNCONDITION( depthSampler, IN.uv3 ).w); //return half4(depth.rrr,1); //return half4(nearCoc.rrr,1.0); diff --git a/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeDetectP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeDetectP.hlsl index d9988341c..c8bfb2153 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeDetectP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/edgeaa/edgeDetectP.hlsl @@ -50,7 +50,7 @@ float GetEdgeWeight(float2 uv0, in float2 targetSize) for(int i = 0; i < 9; i++) { float2 uv = uv0 + offsets[i] * PixelSize; - float4 gbSample = TORQUE_PREPASS_UNCONDITION( deferredBuffer, uv ); + float4 gbSample = TORQUE_DEFERRED_UNCONDITION( deferredBuffer, uv ); Depth[i] = gbSample.a; Normal[i] = gbSample.rgb; } diff --git a/Templates/BaseGame/game/core/shaders/postFX/fogP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/fogP.hlsl index 437d8c396..9f3500f67 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/fogP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/fogP.hlsl @@ -34,7 +34,7 @@ uniform float4 rtParams0; float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 { //float2 deferredCoord = ( IN.uv0.xy * rtParams0.zw ) + rtParams0.xy; - float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w; + float depth = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).w; //return float4( depth, 0, 0, 0.7 ); float factor = computeSceneFog( eyePosWorld, @@ -43,5 +43,5 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 fogData.y, fogData.z ); - return hdrEncode( float4( toLinear(fogColor.rgb), 1.0 - saturate( factor ) ) ); + return hdrEncode( float4( fogColor.rgb, 1.0 - saturate( factor ) ) ); } \ No newline at end of file diff --git a/Templates/BaseGame/game/core/shaders/postFX/gammaP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/gammaP.hlsl index 21b86fe4e..1e13d068b 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/gammaP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/gammaP.hlsl @@ -40,9 +40,6 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 color.g = TORQUE_TEX1D( colorCorrectionTex, color.g ).g; color.b = TORQUE_TEX1D( colorCorrectionTex, color.b ).b; - // Apply gamma correction - color.rgb = pow( saturate(color.rgb), OneOverGamma ); - // Apply contrast color.rgb = ((color.rgb - 0.5f) * Contrast) + 0.5f; diff --git a/Templates/BaseGame/game/core/shaders/postFX/gl/fogP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/fogP.glsl index 9dbc435fe..c2fe32fe4 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/gl/fogP.glsl +++ b/Templates/BaseGame/game/core/shaders/postFX/gl/fogP.glsl @@ -48,5 +48,5 @@ void main() fogData.y, fogData.z ); - OUT_col = hdrEncode( vec4( toLinear(fogColor.rgb), 1.0 - saturate( factor ) ) ); + OUT_col = hdrEncode( vec4( fogColor.rgb, 1.0 - saturate( factor ) ) ); } \ No newline at end of file diff --git a/Templates/BaseGame/game/core/shaders/postFX/gl/gammaP.glsl b/Templates/BaseGame/game/core/shaders/postFX/gl/gammaP.glsl index a170bf39f..04533e494 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/gl/gammaP.glsl +++ b/Templates/BaseGame/game/core/shaders/postFX/gl/gammaP.glsl @@ -44,9 +44,6 @@ void main() color.g = texture( colorCorrectionTex, color.g ).g; color.b = texture( colorCorrectionTex, color.b ).b; - // Apply gamma correction - color.rgb = pow( clamp(color.rgb, vec3(0.0),vec3(1.0)), vec3(OneOverGamma) ); - // Apply contrast color.rgb = ((color.rgb - 0.5f) * Contrast) + 0.5f; diff --git a/Templates/BaseGame/game/core/shaders/postFX/hdr/finalPassCombineP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/finalPassCombineP.hlsl index f87616a6e..07f7276c3 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/hdr/finalPassCombineP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/hdr/finalPassCombineP.hlsl @@ -87,15 +87,6 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 sample.r = TORQUE_TEX1D( colorCorrectionTex, sample.r ).r; sample.g = TORQUE_TEX1D( colorCorrectionTex, sample.g ).g; sample.b = TORQUE_TEX1D( colorCorrectionTex, sample.b ).b; - - // Apply gamma correction - sample.rgb = pow( saturate(sample.rgb), g_fOneOverGamma ); - - // Apply contrast - sample.rgb = ((sample.rgb - 0.5f) * Contrast) + 0.5f; - - // Apply brightness - sample.rgb += Brightness; return sample; } diff --git a/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/finalPassCombineP.glsl b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/finalPassCombineP.glsl index 8437cb04b..4b173d4d3 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/finalPassCombineP.glsl +++ b/Templates/BaseGame/game/core/shaders/postFX/hdr/gl/finalPassCombineP.glsl @@ -93,14 +93,5 @@ void main() _sample.g = texture( colorCorrectionTex, _sample.g ).g; _sample.b = texture( colorCorrectionTex, _sample.b ).b; - // Apply gamma correction - _sample.rgb = pow( _sample.rgb, vec3(g_fOneOverGamma) ); - - // Apply contrast - _sample.rgb = ((_sample.rgb - 0.5f) * Contrast) + 0.5f; - - // Apply brightness - _sample.rgb += Brightness; - OUT_col = _sample; } diff --git a/Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayOccludeP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayOccludeP.hlsl index 1a0e4222f..5db6ecb5b 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayOccludeP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/lightRay/lightRayOccludeP.hlsl @@ -36,7 +36,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 float4 col = float4( 0, 0, 0, 1 ); // Get the depth at this pixel. - float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w; + float depth = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).w; // If the depth is equal to 1.0, read from the backbuffer // and perform the exposure calculation on the result. diff --git a/Templates/BaseGame/game/core/shaders/postFX/motionBlurP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/motionBlurP.hlsl index 50839fe1e..90b8f6f25 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/motionBlurP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/motionBlurP.hlsl @@ -37,7 +37,7 @@ float4 main(PFXVertToPix IN) : TORQUE_TARGET0 float samples = 5; // First get the deferred texture for uv channel 0 - float4 deferred = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ); + float4 deferred = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ); // Next extract the depth float depth = deferred.a; diff --git a/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_P.hlsl index 0a49622cf..a47261397 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_P.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_Blur_P.hlsl @@ -49,7 +49,7 @@ uniform float blurNormalTol; void sample( float2 uv, float weight, float4 centerTap, inout int usedCount, inout float occlusion, inout float total ) { //return; - float4 tap = TORQUE_PREPASS_UNCONDITION( deferredMap, uv ); + float4 tap = TORQUE_DEFERRED_UNCONDITION( deferredMap, uv ); if ( abs( tap.a - centerTap.a ) < blurDepthTol ) { @@ -65,7 +65,7 @@ void sample( float2 uv, float weight, float4 centerTap, inout int usedCount, ino float4 main( VertToPix IN ) : TORQUE_TARGET0 { //float4 centerTap; - float4 centerTap = TORQUE_PREPASS_UNCONDITION( deferredMap, IN.uv0.zw ); + float4 centerTap = TORQUE_DEFERRED_UNCONDITION( deferredMap, IN.uv0.zw ); //return centerTap; diff --git a/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_P.hlsl b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_P.hlsl index 66aa3e8d3..67365e846 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_P.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/ssao/SSAO_P.hlsl @@ -143,7 +143,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 float3 reflectNormal = normalize( TORQUE_TEX2DLOD( randNormalTex, noiseMapUV ).xyz * 2.0 - 1.0 ); //return float4( reflectNormal, 1 ); - float4 deferred = TORQUE_PREPASS_UNCONDITION( deferredMap, IN.uv0 ); + float4 deferred = TORQUE_DEFERRED_UNCONDITION( deferredMap, IN.uv0 ); float3 normal = deferred.xyz; float depth = deferred.a; //return float4( ( depth ).xxx, 1 ); @@ -183,7 +183,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 //if ( radiusDepth.x < 1.0 / targetSize.x ) // return color; //radiusDepth.xyz = 0.0009; - + [unroll] for ( i = 0; i < sSampleCount; i++ ) { baseRay = reflect( ptSphere[i], reflectNormal ); @@ -197,7 +197,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 se = ep + ray; - occluderFragment = TORQUE_PREPASS_UNCONDITION( deferredMap, se.xy ); + occluderFragment = TORQUE_DEFERRED_UNCONDITION( deferredMap, se.xy ); depthDiff = se.z - occluderFragment.a; @@ -232,7 +232,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 //if ( radiusDepth.x < 1.0 / targetSize.x ) // return color; //radiusDepth.xyz = 0.0009; - + [unroll] for ( i = sSampleCount; i < totalSampleCount; i++ ) { baseRay = reflect( ptSphere[i], reflectNormal ); @@ -246,7 +246,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 se = ep + ray; - occluderFragment = TORQUE_PREPASS_UNCONDITION( deferredMap, se.xy ); + occluderFragment = TORQUE_DEFERRED_UNCONDITION( deferredMap, se.xy ); depthDiff = se.z - occluderFragment.a; diff --git a/Templates/BaseGame/game/core/shaders/postFX/underwaterFogP.hlsl b/Templates/BaseGame/game/core/shaders/postFX/underwaterFogP.hlsl index b7d126f54..aab43c45c 100644 --- a/Templates/BaseGame/game/core/shaders/postFX/underwaterFogP.hlsl +++ b/Templates/BaseGame/game/core/shaders/postFX/underwaterFogP.hlsl @@ -55,7 +55,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 { //float2 deferredCoord = IN.uv0; //IN.uv0 = ( IN.uv0.xy * rtParams0.zw ) + rtParams0.xy; - float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w; + float depth = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).w; //return float4( depth.rrr, 1 ); // Skip fogging the extreme far plane so that diff --git a/Templates/BaseGame/game/core/shaders/shaderModelAutoGen.hlsl b/Templates/BaseGame/game/core/shaders/shaderModelAutoGen.hlsl index 33531cbf6..d70847e46 100644 --- a/Templates/BaseGame/game/core/shaders/shaderModelAutoGen.hlsl +++ b/Templates/BaseGame/game/core/shaders/shaderModelAutoGen.hlsl @@ -27,9 +27,9 @@ // Portability helpers for autogenConditioners #if (TORQUE_SM >= 10 && TORQUE_SM <=30) - #define TORQUE_PREPASS_UNCONDITION(tex, coords) deferredUncondition(tex, coords) + #define TORQUE_DEFERRED_UNCONDITION(tex, coords) deferredUncondition(tex, coords) #elif TORQUE_SM >= 40 - #define TORQUE_PREPASS_UNCONDITION(tex, coords) deferredUncondition(tex, texture_##tex, coords) + #define TORQUE_DEFERRED_UNCONDITION(tex, coords) deferredUncondition(tex, texture_##tex, coords) #endif #endif //_TORQUE_SHADERMODEL_AUTOGEN_ diff --git a/Templates/BaseGame/game/core/shaders/water/gl/waterBasicP.glsl b/Templates/BaseGame/game/core/shaders/water/gl/waterBasicP.glsl index 9ece76b72..91bdb4137 100644 --- a/Templates/BaseGame/game/core/shaders/water/gl/waterBasicP.glsl +++ b/Templates/BaseGame/game/core/shaders/water/gl/waterBasicP.glsl @@ -120,7 +120,6 @@ void main() { // Modulate baseColor by the ambientColor. vec4 waterBaseColor = baseColor * vec4( ambientColor.rgb, 1 ); - waterBaseColor = toLinear(waterBaseColor); // Get the bumpNorm... vec3 bumpNorm = ( texture( bumpMap, IN_rippleTexCoord01.xy ).rgb * 2.0 - 1.0 ) * rippleMagnitude.x; diff --git a/Templates/BaseGame/game/core/shaders/water/gl/waterP.glsl b/Templates/BaseGame/game/core/shaders/water/gl/waterP.glsl index 512eebda9..d4804245a 100644 --- a/Templates/BaseGame/game/core/shaders/water/gl/waterP.glsl +++ b/Templates/BaseGame/game/core/shaders/water/gl/waterP.glsl @@ -324,7 +324,6 @@ void main() // Calculate the water "base" color based on depth. vec4 waterBaseColor = baseColor * texture( depthGradMap, saturate( delta / depthGradMax ) ); - waterBaseColor = toLinear(waterBaseColor); // Modulate baseColor by the ambientColor. waterBaseColor *= vec4( ambientColor.rgb, 1 ); diff --git a/Templates/BaseGame/game/core/shaders/water/waterBasicP.hlsl b/Templates/BaseGame/game/core/shaders/water/waterBasicP.hlsl index f34a4e551..9cacfdf7a 100644 --- a/Templates/BaseGame/game/core/shaders/water/waterBasicP.hlsl +++ b/Templates/BaseGame/game/core/shaders/water/waterBasicP.hlsl @@ -117,7 +117,6 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0 { // Modulate baseColor by the ambientColor. float4 waterBaseColor = baseColor * float4( ambientColor.rgb, 1 ); - waterBaseColor = toLinear(waterBaseColor); // Get the bumpNorm... float3 bumpNorm = ( TORQUE_TEX2D( bumpMap, IN.rippleTexCoord01.xy ).rgb * 2.0 - 1.0 ) * rippleMagnitude.x; diff --git a/Templates/BaseGame/game/core/shaders/water/waterP.hlsl b/Templates/BaseGame/game/core/shaders/water/waterP.hlsl index 25820d403..59bdad05d 100644 --- a/Templates/BaseGame/game/core/shaders/water/waterP.hlsl +++ b/Templates/BaseGame/game/core/shaders/water/waterP.hlsl @@ -155,7 +155,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0 float2 deferredCoord = viewportCoordToRenderTarget( IN.posPostWave, rtParams1 ); - float startDepth = TORQUE_PREPASS_UNCONDITION( deferredTex, deferredCoord ).w; + float startDepth = TORQUE_DEFERRED_UNCONDITION( deferredTex, deferredCoord ).w; // The water depth in world units of the undistorted pixel. float startDelta = ( startDepth - pixelDepth ); @@ -180,7 +180,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0 deferredCoord = viewportCoordToRenderTarget( distortPos, rtParams1 ); // Get deferred depth at the position of this distorted pixel. - float deferredDepth = TORQUE_PREPASS_UNCONDITION( deferredTex, deferredCoord ).w; + float deferredDepth = TORQUE_DEFERRED_UNCONDITION( deferredTex, deferredCoord ).w; if ( deferredDepth > 0.99 ) deferredDepth = 5.0; @@ -212,7 +212,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0 deferredCoord = viewportCoordToRenderTarget( distortPos, rtParams1 ); // Get deferred depth at the position of this distorted pixel. - deferredDepth = TORQUE_PREPASS_UNCONDITION( deferredTex, deferredCoord ).w; + deferredDepth = TORQUE_DEFERRED_UNCONDITION( deferredTex, deferredCoord ).w; if ( deferredDepth > 0.99 ) deferredDepth = 5.0; delta = ( deferredDepth - pixelDepth ) * farPlaneDist; @@ -311,7 +311,6 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0 // Calculate the water "base" color based on depth. float4 waterBaseColor = baseColor * TORQUE_TEX1D( depthGradMap, saturate( delta / depthGradMax ) ); - waterBaseColor = toLinear(waterBaseColor); // Modulate baseColor by the ambientColor. waterBaseColor *= float4( ambientColor.rgb, 1 ); diff --git a/Templates/BaseGame/game/data/defaults.cs b/Templates/BaseGame/game/data/defaults.cs index ea7ee6a19..33d7cd8f7 100644 --- a/Templates/BaseGame/game/data/defaults.cs +++ b/Templates/BaseGame/game/data/defaults.cs @@ -25,7 +25,7 @@ $sceneLighting::cacheSize = 20000; $sceneLighting::purgeMethod = "lastCreated"; $sceneLighting::cacheLighting = 1; -$pref::Video::displayDevice = "D3D9"; +$pref::Video::displayDevice = "D3D11"; $pref::Video::disableVerticalSync = 1; $pref::Video::Resolution = "1024 768"; $pref::Video::FullScreen = false; diff --git a/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui b/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui index 860850cb3..8da22f833 100644 --- a/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui +++ b/Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui @@ -865,65 +865,6 @@ canSaveDynamicFields = "0"; }; }; - new GuiControl() { - position = "0 160"; - extent = "450 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTextCtrl() { - text = "Gamma"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "175 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiMenuTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl() { - range = "2 2.5"; - ticks = "0"; - snap = "0"; - value = "2"; - position = "190 0"; - extent = "261 20"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiSliderProfile"; - visible = "1"; - active = "1"; - variable = "$pref::Video::Gamma"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; new GuiControl() { position = "0 180"; extent = "450 20"; diff --git a/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui b/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui index d8f15e76b..c203ca52e 100644 --- a/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui +++ b/Templates/BaseGame/game/tools/gui/colorPicker.ed.gui @@ -718,22 +718,6 @@ canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiCheckBoxCtrl() { - text = "use sRGB"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "360 105"; - extent = "66 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiCheckBoxProfile"; - visible = "1"; - active = "1"; - variable = "$displayAsSRGB"; - command = "useSRGBctrl($displayAsSRGB);"; - }; }; }; //--- OBJECT WRITE END --- @@ -743,15 +727,6 @@ $ColorPickerCancelCallback = ""; $ColorPickerUpdateCallback = ""; $ColorCallbackType = 1; // ColorI -function useSRGBctrl(%colorScale) -{ -ColorPickerDlg.useSRGB = %colorScale; -ColorRangeSelect.useSRGB = %colorScale; -ColorBlendSelect.useSRGB = %colorScale; -myColor.useSRGB = %colorScale; -oldColor.useSRGB = %colorScale; -} - // This function pushes the color picker dialog and returns to a callback the selected value function GetColorI( %currentColor, %callback, %root, %updateCallback, %cancelCallback ) { diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl index e554c4445..83547571a 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgDepthVisualizeP.hlsl @@ -28,6 +28,6 @@ TORQUE_UNIFORM_SAMPLER1D(depthViz, 1); float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 { - float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w; + float depth = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).w; return float4( TORQUE_TEX1D( depthViz, depth ).rgb, 1.0 ); } diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl index b4443514c..913745bb5 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/shaders/dbgNormalVisualizeP.hlsl @@ -27,6 +27,6 @@ TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0); float4 main( PFXVertToPix IN ) : TORQUE_TARGET0 { - float3 normal = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).xyz; + float3 normal = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).xyz; return float4( ( normal + 1.0 ) * 0.5, 1.0 ); } \ No newline at end of file diff --git a/Templates/Modules/FPSGameplay/scripts/datablocks/managedDecalData.cs b/Templates/Modules/FPSGameplay/scripts/datablocks/managedDecalData.cs index 90f6a534e..5085de339 100644 --- a/Templates/Modules/FPSGameplay/scripts/datablocks/managedDecalData.cs +++ b/Templates/Modules/FPSGameplay/scripts/datablocks/managedDecalData.cs @@ -39,8 +39,8 @@ datablock DecalData(ScorchRXDecal) texRows = "2"; texCols = "2"; clippingAngle = "80"; - screenStartRadius = "200"; - screenEndRadius = "100"; + fadeStartPixelSize = "200"; + fadeEndPixelSize = "100"; }; datablock DecalData(bulletHoleDecal) @@ -51,7 +51,7 @@ datablock DecalData(bulletHoleDecal) randomize = "1"; texRows = "2"; texCols = "2"; - screenStartRadius = "20"; - screenEndRadius = "5"; + fadeStartPixelSize = "20"; + fadeEndPixelSize = "5"; clippingAngle = "180"; }; diff --git a/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/grenadefx.cs b/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/grenadefx.cs index 7c1739c72..f9685458d 100644 --- a/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/grenadefx.cs +++ b/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/grenadefx.cs @@ -55,7 +55,7 @@ datablock LightDescription(GrenadeLauncherLightDesc) datablock ParticleData(GrenadeDebrisFireParticle) { textureName = "data/FPSGameplay/art/particles/impact"; - dragCoefficient = 0; + dragCoeffiecient = 0; gravityCoefficient = -1.00366; inheritedVelFactor = 0.0; constantAcceleration = 0.0; @@ -127,7 +127,7 @@ datablock DebrisData(GrenadeDebris) datablock ParticleData(GrenadeSplashMist) { - dragCoefficient = 1.0; + dragCoeffiecient = 1.0; windCoefficient = 2.0; gravityCoefficient = 0.3; inheritedVelFactor = 0.0; @@ -172,7 +172,7 @@ datablock ParticleEmitterData(GrenadeSplashMistEmitter) datablock ParticleData(GrenadeSplashParticle) { - dragCoefficient = 1; + dragCoeffiecient = 1; windCoefficient = 0.9; gravityCoefficient = 0.3; inheritedVelFactor = 0.2; @@ -215,7 +215,7 @@ datablock ParticleEmitterData(GrenadeSplashEmitter) datablock ParticleData(GrenadeSplashRingParticle) { textureName = "data/FPSGameplay/art/particles/wake"; - dragCoefficient = 0.0; + dragCoeffiecient = 0.0; gravityCoefficient = 0.0; inheritedVelFactor = 0.0; lifetimeMS = 2500; @@ -298,7 +298,7 @@ datablock SplashData(GrenadeSplash) datablock ParticleData(GrenadeExpFire) { textureName = "data/FPSGameplay/art/particles/fireball.png"; - dragCoefficient = 0; + dragCoeffiecient = 0; windCoeffiecient = 0.5; gravityCoefficient = -1; inheritedVelFactor = 0; @@ -320,7 +320,7 @@ datablock ParticleData(GrenadeExpFire) times[2] = 0.5; animTexName = "data/FPSGameplay/art/particles/fireball.png"; times[3] = "1"; - dragCoefficient = "1.99902"; + dragCoeffiecient = "1.99902"; sizes[3] = "10"; colors[3] = "0 0 0 0"; }; @@ -341,7 +341,7 @@ datablock ParticleEmitterData(GrenadeExpFireEmitter) datablock ParticleData(GrenadeExpDust) { textureName = "data/FPSGameplay/art/particles/smoke.png"; - dragCoefficient = 0.498534; + dragCoeffiecient = 0.498534; gravityCoefficient = 0; inheritedVelFactor = 1; constantAcceleration = 0.0; @@ -385,7 +385,7 @@ datablock ParticleEmitterData(GrenadeExpDustEmitter) datablock ParticleData(GrenadeExpSpark) { textureName = "data/FPSGameplay/art/particles/Sparkparticle"; - dragCoefficient = 1; + dragCoeffiecient = 1; gravityCoefficient = 0.0; inheritedVelFactor = 0.2; constantAcceleration = 0.0; @@ -422,7 +422,7 @@ datablock ParticleEmitterData(GrenadeExpSparkEmitter) datablock ParticleData(GrenadeExpSparks) { textureName = "data/FPSGameplay/art/particles/droplet"; - dragCoefficient = 1; + dragCoeffiecient = 1; gravityCoefficient = 0.0; inheritedVelFactor = 0.2; constantAcceleration = 0.0; @@ -462,7 +462,7 @@ datablock ParticleEmitterData(GrenadeExpSparksEmitter) datablock ParticleData(GrenadeExpSmoke) { textureName = "data/FPSGameplay/art/particles/smoke"; - dragCoefficient = 0; + dragCoeffiecient = 0; gravityCoefficient = -0.40293; inheritedVelFactor = 0.0; constantAcceleration = 0.0; @@ -550,7 +550,7 @@ datablock ExplosionData(GrenadeExplosion) datablock ParticleData(GLWaterExpDust) { textureName = "data/FPSGameplay/art/particles/steam"; - dragCoefficient = 1.0; + dragCoeffiecient = 1.0; gravityCoefficient = -0.01; inheritedVelFactor = 0.0; constantAcceleration = 0.0; @@ -590,7 +590,7 @@ datablock ParticleEmitterData(GLWaterExpDustEmitter) datablock ParticleData(GLWaterExpSparks) { textureName = "data/FPSGameplay/art/particles/spark_wet"; - dragCoefficient = 1; + dragCoeffiecient = 1; gravityCoefficient = 0.0; inheritedVelFactor = 0.2; constantAcceleration = 0.0; @@ -630,7 +630,7 @@ datablock ParticleEmitterData(GLWaterExpSparkEmitter) datablock ParticleData(GLWaterExpSmoke) { textureName = "data/FPSGameplay/art/particles/smoke"; - dragCoefficient = 0.4; + dragCoeffiecient = 0.4; gravityCoefficient = -0.25; inheritedVelFactor = 0.025; constantAcceleration = -1.1; @@ -669,7 +669,7 @@ datablock ParticleEmitterData(GLWaterExpSmokeEmitter) datablock ParticleData(GLWaterExpBubbles) { textureName = "data/FPSGameplay/art/particles/millsplash01"; - dragCoefficient = 0.0; + dragCoeffiecient = 0.0; gravityCoefficient = -0.05; inheritedVelFactor = 0.0; constantAcceleration = 0.0; @@ -799,7 +799,7 @@ datablock ExplosionData(GrenadeLauncherExplosion) datablock ParticleData(GrenadeTrailWaterParticle) { textureName = "data/FPSGameplay/art/particles/bubble"; - dragCoefficient = 0.0; + dragCoeffiecient = 0.0; gravityCoefficient = 0.1; inheritedVelFactor = 0.0; constantAcceleration = 0.0; @@ -845,7 +845,7 @@ datablock ParticleEmitterData(GrenadeTrailWaterEmitter) datablock ParticleData(GrenadeProjSmokeTrail) { textureName = "data/FPSGameplay/art/particles/smoke"; - dragCoefficient = 0.0; + dragCoeffiecient = 0.0; gravityCoefficient = -0.2; inheritedVelFactor = 0.0; constantAcceleration = 0.0; diff --git a/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/rocketfx.cs b/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/rocketfx.cs index ae8223144..6df928a99 100644 --- a/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/rocketfx.cs +++ b/Templates/Modules/FPSGameplay/scripts/datablocks/weapons/rocketfx.cs @@ -28,7 +28,7 @@ datablock SFXProfile(RocketLauncherExplosionSound) datablock ParticleData(RocketDebrisTrailParticle) { textureName = "data/FPSGameplay/art/particles/impact"; - dragCoefficient = 0; + dragCoeffiecient = 0; inheritedVelFactor = 0.0; constantAcceleration = 0.0; lifetimeMS = 1200;//1000; @@ -96,7 +96,7 @@ datablock DebrisData(RocketDebris) datablock ParticleData(RocketSplashMist) { - dragCoefficient = 1.0; + dragCoeffiecient = 1.0; windCoefficient = 2.0; gravityCoefficient = 0.3; inheritedVelFactor = 0.0; @@ -137,7 +137,7 @@ datablock ParticleEmitterData(RocketSplashMistEmitter) datablock ParticleData(RocketSplashParticle) { - dragCoefficient = 1; + dragCoeffiecient = 1; windCoefficient = 0.9; gravityCoefficient = 0.3; inheritedVelFactor = 0.2; @@ -177,7 +177,7 @@ datablock ParticleEmitterData(RocketSplashEmitter) datablock ParticleData(RocketSplashRingParticle) { textureName = "data/FPSGameplay/art/particles/wake"; - dragCoefficient = 0.0; + dragCoeffiecient = 0.0; gravityCoefficient = 0.0; inheritedVelFactor = 0.0; lifetimeMS = 2500;