mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 00:05:40 +00:00
linux followup work by tim
This commit is contained in:
parent
9fe9389ae5
commit
f1282a9cbc
26 changed files with 6646 additions and 5681 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
in vec4 hpos;
|
||||
in vec2 uv0;
|
||||
#line 27
|
||||
|
||||
uniform samplerCube environmentMap;
|
||||
|
||||
|
|
@ -123,8 +124,7 @@ vec4 prefilterEnvMap(vec3 R)
|
|||
out vec4 OUT_col;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
{
|
||||
vec3 N = getCubeDir(face, uv0);
|
||||
OUT_col = prefilterEnvMap(N);
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#include "../../../gl/hlslCompat.glsl"
|
||||
#include "../../../postFx/gl/postFx.glsl"
|
||||
#include "../../../postFX/gl/postFx.glsl"
|
||||
#include "../../../gl/torque.glsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
#include "../../../gl/lighting.glsl"
|
||||
|
|
@ -55,6 +55,7 @@ void main()
|
|||
|
||||
float alpha = 1;
|
||||
|
||||
#ifdef SKYLIGHT_ONLY
|
||||
#if SKYLIGHT_ONLY == 0
|
||||
int i = 0;
|
||||
float blendFactor[MAX_PROBES];
|
||||
|
|
@ -154,6 +155,7 @@ void main()
|
|||
#endif
|
||||
//}
|
||||
#endif
|
||||
#endif //SKYLIGHT_ONLY
|
||||
|
||||
vec3 irradiance = vec3(0, 0, 0);
|
||||
vec3 specular = vec3(0, 0, 0);
|
||||
|
|
@ -165,6 +167,7 @@ void main()
|
|||
float lod = 0;
|
||||
#endif
|
||||
|
||||
#ifdef SKYLIGHT_ONLY
|
||||
#if SKYLIGHT_ONLY == 0
|
||||
alpha = 1;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
|
|
@ -172,7 +175,7 @@ void main()
|
|||
float contrib = contribution[i];
|
||||
if (contrib != 0)
|
||||
{
|
||||
int cubemapIdx = probeConfigData[i].a;
|
||||
float cubemapIdx = probeConfigData[i].a;
|
||||
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], bbMinArray[i].xyz, bbMaxArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
||||
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
|
||||
|
|
@ -181,6 +184,7 @@ void main()
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#endif //SKYLIGHT_ONLY
|
||||
|
||||
if (skylightCubemapIdx != -1 && alpha > 0.001)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue