mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #1594 from Azaezel/alpha41/shadervarCleanups
eyePosWorld usage cleanups
This commit is contained in:
commit
5b3df0119a
8 changed files with 5 additions and 9 deletions
|
|
@ -61,9 +61,9 @@ singleton GFXStateBlockData( WaterStateBlock )
|
||||||
{
|
{
|
||||||
samplersDefined = true;
|
samplersDefined = true;
|
||||||
samplerStates[0] = WaterSampler; // noise
|
samplerStates[0] = WaterSampler; // noise
|
||||||
samplerStates[1] = SamplerClampPoint; // #deferred
|
samplerStates[1] = SamplerClampLinear; // #deferred
|
||||||
samplerStates[2] = SamplerClampLinear; // $reflectbuff
|
samplerStates[2] = SamplerClampLinear; // $reflectbuff
|
||||||
samplerStates[3] = SamplerClampPoint; // $backbuff
|
samplerStates[3] = SamplerClampLinear; // $backbuff
|
||||||
samplerStates[4] = SamplerWrapLinear; // $cubemap
|
samplerStates[4] = SamplerWrapLinear; // $cubemap
|
||||||
samplerStates[5] = SamplerWrapLinear; // foam
|
samplerStates[5] = SamplerWrapLinear; // foam
|
||||||
samplerStates[6] = SamplerClampLinear; // depthMap ( color gradient )
|
samplerStates[6] = SamplerClampLinear; // depthMap ( color gradient )
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,13 @@
|
||||||
|
|
||||||
#include "./torque.glsl"
|
#include "./torque.glsl"
|
||||||
#include "./brdf.glsl"
|
#include "./brdf.glsl"
|
||||||
|
#line 25
|
||||||
|
|
||||||
uniform float maxProbeDrawDistance;
|
uniform float maxProbeDrawDistance;
|
||||||
uniform int isCapturing;
|
uniform int isCapturing;
|
||||||
|
|
||||||
#ifndef TORQUE_SHADERGEN
|
#ifndef TORQUE_SHADERGEN
|
||||||
#line 27
|
uniform vec3 eyePosWorld;
|
||||||
// These are the uniforms used by most lighting shaders.
|
// These are the uniforms used by most lighting shaders.
|
||||||
|
|
||||||
uniform vec4 inLightPos[4];
|
uniform vec4 inLightPos[4];
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@
|
||||||
#include "./shaderModelAutoGen.hlsl"
|
#include "./shaderModelAutoGen.hlsl"
|
||||||
|
|
||||||
//globals
|
//globals
|
||||||
uniform float3 eyePosWorld;
|
|
||||||
uniform float maxProbeDrawDistance;
|
uniform float maxProbeDrawDistance;
|
||||||
uniform int isCapturing;
|
uniform int isCapturing;
|
||||||
#ifndef TORQUE_SHADERGEN
|
#ifndef TORQUE_SHADERGEN
|
||||||
|
uniform float3 eyePosWorld;
|
||||||
|
|
||||||
// These are the uniforms used by most lighting shaders.
|
// These are the uniforms used by most lighting shaders.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,6 @@ uniform float lightInvSqrRange;
|
||||||
uniform float shadowSoftness;
|
uniform float shadowSoftness;
|
||||||
uniform mat3 worldToLightProj;
|
uniform mat3 worldToLightProj;
|
||||||
|
|
||||||
uniform vec3 eyePosWorld;
|
|
||||||
uniform mat4 cameraToWorld;
|
uniform mat4 cameraToWorld;
|
||||||
|
|
||||||
out vec4 OUT_col;
|
out vec4 OUT_col;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ uniform vec3 ambientColor;
|
||||||
uniform vec4 rtParams0;
|
uniform vec4 rtParams0;
|
||||||
uniform vec4 vsFarPlane;
|
uniform vec4 vsFarPlane;
|
||||||
uniform mat4 cameraToWorld;
|
uniform mat4 cameraToWorld;
|
||||||
uniform vec3 eyePosWorld;
|
|
||||||
|
|
||||||
//cubemap arrays require all the same size. so shared mips# value
|
//cubemap arrays require all the same size. so shared mips# value
|
||||||
uniform float cubeMips;
|
uniform float cubeMips;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ uniform vec4 rtParams0;
|
||||||
|
|
||||||
uniform vec4 vsFarPlane;
|
uniform vec4 vsFarPlane;
|
||||||
uniform mat4 cameraToWorld;
|
uniform mat4 cameraToWorld;
|
||||||
uniform vec3 eyePosWorld;
|
|
||||||
|
|
||||||
vec3 iblSpecular(in Surface surface, vec3 F)
|
vec3 iblSpecular(in Surface surface, vec3 F)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ uniform vec4 vsFarPlane;
|
||||||
uniform mat4 worldToLightProj;
|
uniform mat4 worldToLightProj;
|
||||||
uniform vec4 lightParams;
|
uniform vec4 lightParams;
|
||||||
uniform float shadowSoftness;
|
uniform float shadowSoftness;
|
||||||
uniform vec3 eyePosWorld;
|
|
||||||
|
|
||||||
uniform mat4 cameraToWorld;
|
uniform mat4 cameraToWorld;
|
||||||
uniform mat4 worldToCamera;
|
uniform mat4 worldToCamera;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ uniform vec4 lightColor;
|
||||||
uniform vec4 lightAmbient;
|
uniform vec4 lightAmbient;
|
||||||
|
|
||||||
uniform float shadowSoftness;
|
uniform float shadowSoftness;
|
||||||
uniform vec3 eyePosWorld;
|
|
||||||
|
|
||||||
uniform vec4 atlasXOffset;
|
uniform vec4 atlasXOffset;
|
||||||
uniform vec4 atlasYOffset;
|
uniform vec4 atlasYOffset;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue