mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
specify lod (mip) 0 for the brdf texture
This commit is contained in:
parent
f871b965cd
commit
bf10d48287
1 changed files with 5 additions and 5 deletions
|
|
@ -171,10 +171,10 @@ void main()
|
|||
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;
|
||||
//specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
|
||||
irradiance += vec3(1,1,1) * contrib;
|
||||
specular += vec3(1,1,1) * contrib;
|
||||
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
|
||||
specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
|
||||
//irradiance += vec3(1,1,1) * contrib;
|
||||
//specular += vec3(1,1,1) * contrib;
|
||||
alpha -= contrib;
|
||||
}
|
||||
}
|
||||
|
|
@ -201,7 +201,7 @@ void main()
|
|||
|
||||
//apply brdf
|
||||
//Do it once to save on texture samples
|
||||
vec2 brdf = texture(BRDFTexture, vec2(surface.roughness, surface.NdotV)).xy;
|
||||
vec2 brdf = textureLod(BRDFTexture, vec2(surface.roughness, surface.NdotV),0).xy;
|
||||
specular *= brdf.x * F + brdf.y;
|
||||
|
||||
//final diffuse color
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue