mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Script:
by and large, Opengl branch compatibility alterations, though do again note the inclusion of sampler["lightBuffer"] = "#lightinfo"; sampler["colorBuffer"] = "#color"; sampler["matInfoBuffer"] = "#matinfo"; and samplerNames[5] = "$lightBuffer"; samplerNames[6] = "$colorBuffer"; samplerNames[7] = "$matInfoBuffer"; entries. This is where the engine knows to pass along a given rendertarget for input into a predefined shader, as opposed to the prior phase's output to targets within procedural ones. Shader: the XXXLight.hlsl/glsls account for alterations in inputs, check for emissive and translucency, apply Felix's Normal Mapped Ambient. and pass the results along to AL_DeferredOutput for final computation before returning the result. the lighting.hlsl/.glsl consissts of removal of the overridden engine-specific phong specular variant, and defines the AL_DeferredOutput method, which equates to the previously used pixspecular feature defined along the lines of http://books.google.com/books?id=GY-AAwAAQBAJ&pg=PA112&lpg=PA112&dq=blinn+phong+specular+gloss+hlsl&source=bl&ots=q9SKJkmWHB&sig=uLIHX10Zul0X0LL2ehSMq7IFBIM&hl=en&sa=X&ei=DbcsVPeWEdW1yASDy4LYDw&ved=0CB4Q6AEwAA#v=onepage&q=gloss%20&f=false also includes visualizers Long term impact: This area, along with the \game\shaders\common\lighting\advanced\lightingUtils.hlsl/.glsl pair will be where we plug in properly attenuated Cook-Torrence later, presuming the impact is not to hefty.
This commit is contained in:
parent
196b214eae
commit
5ed06fff9d
13 changed files with 203 additions and 50 deletions
|
|
@ -36,8 +36,11 @@ new GFXStateBlockData( AL_VectorLightState )
|
|||
|
||||
samplersDefined = true;
|
||||
samplerStates[0] = SamplerClampPoint; // G-buffer
|
||||
mSamplerNames[0] = "prePassBuffer";
|
||||
samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
|
||||
mSamplerNames[1] = "shadowMap";
|
||||
samplerStates[2] = SamplerClampLinear; // SSAO Mask
|
||||
mSamplerNames[2] = "ssaoMask";
|
||||
samplerStates[3] = SamplerWrapPoint; // Random Direction Map
|
||||
|
||||
cullDefined = true;
|
||||
|
|
@ -66,7 +69,9 @@ new ShaderData( AL_VectorLightShader )
|
|||
samplerNames[2] = "$dynamicShadowMap";
|
||||
samplerNames[3] = "$ssaoMask";
|
||||
samplerNames[4] = "$gTapRotationTex";
|
||||
|
||||
samplerNames[5] = "$lightBuffer";
|
||||
samplerNames[6] = "$colorBuffer";
|
||||
samplerNames[7] = "$matInfoBuffer";
|
||||
pixVersion = 3.0;
|
||||
};
|
||||
|
||||
|
|
@ -78,7 +83,10 @@ new CustomMaterial( AL_VectorLightMaterial )
|
|||
sampler["prePassBuffer"] = "#prepass";
|
||||
sampler["shadowMap"] = "$dynamiclight";
|
||||
sampler["dynamicShadowMap"] = "$dynamicShadowMap";
|
||||
sampler["ssaoMask"] = "#ssaoMask";
|
||||
sampler["ssaoMask"] = "#ssaoMask";
|
||||
sampler["lightBuffer"] = "#lightinfo";
|
||||
sampler["colorBuffer"] = "#color";
|
||||
sampler["matInfoBuffer"] = "#matinfo";
|
||||
|
||||
target = "lightinfo";
|
||||
|
||||
|
|
@ -103,7 +111,9 @@ new GFXStateBlockData( AL_ConvexLightState )
|
|||
|
||||
samplersDefined = true;
|
||||
samplerStates[0] = SamplerClampPoint; // G-buffer
|
||||
mSamplerNames[0] = "prePassBuffer";
|
||||
samplerStates[1] = SamplerClampPoint; // Shadow Map (Do not use linear, these are perspective projections)
|
||||
mSamplerNames[1] = "shadowMap";
|
||||
samplerStates[2] = SamplerClampLinear; // Cookie Map
|
||||
samplerStates[3] = SamplerWrapPoint; // Random Direction Map
|
||||
|
||||
|
|
@ -133,6 +143,9 @@ new ShaderData( AL_PointLightShader )
|
|||
samplerNames[2] = "$dynamicShadowMap";
|
||||
samplerNames[3] = "$cookieMap";
|
||||
samplerNames[4] = "$gTapRotationTex";
|
||||
samplerNames[5] = "$lightBuffer";
|
||||
samplerNames[6] = "$colorBuffer";
|
||||
samplerNames[7] = "$matInfoBuffer";
|
||||
|
||||
pixVersion = 3.0;
|
||||
};
|
||||
|
|
@ -146,6 +159,9 @@ new CustomMaterial( AL_PointLightMaterial )
|
|||
sampler["shadowMap"] = "$dynamiclight";
|
||||
sampler["dynamicShadowMap"] = "$dynamicShadowMap";
|
||||
sampler["cookieMap"] = "$dynamiclightmask";
|
||||
sampler["lightBuffer"] = "#lightinfo";
|
||||
sampler["colorBuffer"] = "#color";
|
||||
sampler["matInfoBuffer"] = "#matinfo";
|
||||
|
||||
target = "lightinfo";
|
||||
|
||||
|
|
@ -166,6 +182,9 @@ new ShaderData( AL_SpotLightShader )
|
|||
samplerNames[2] = "$dynamicShadowMap";
|
||||
samplerNames[3] = "$cookieMap";
|
||||
samplerNames[4] = "$gTapRotationTex";
|
||||
samplerNames[5] = "$lightBuffer";
|
||||
samplerNames[6] = "$colorBuffer";
|
||||
samplerNames[7] = "$matInfoBuffer";
|
||||
|
||||
pixVersion = 3.0;
|
||||
};
|
||||
|
|
@ -179,6 +198,9 @@ new CustomMaterial( AL_SpotLightMaterial )
|
|||
sampler["shadowMap"] = "$dynamiclight";
|
||||
sampler["dynamicShadowMap"] = "$dynamicShadowMap";
|
||||
sampler["cookieMap"] = "$dynamiclightmask";
|
||||
sampler["lightBuffer"] = "#lightinfo";
|
||||
sampler["colorBuffer"] = "#color";
|
||||
sampler["matInfoBuffer"] = "#matinfo";
|
||||
|
||||
target = "lightinfo";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue