mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 14:36:39 +00:00
Merge branch 'lighting' into 'master'
Clamp vertex lighting properly (#6697) Closes #6697 See merge request OpenMW/openmw!1811
This commit is contained in:
commit
f0d84342b1
4 changed files with 7 additions and 3 deletions
|
@ -112,6 +112,7 @@
|
||||||
Bug #6670: Dialogue order is incorrect
|
Bug #6670: Dialogue order is incorrect
|
||||||
Bug #6680: object.cpp handles nodetree unsafely, memory access with dangling pointer
|
Bug #6680: object.cpp handles nodetree unsafely, memory access with dangling pointer
|
||||||
Bug #6682: HitOnMe doesn't fire as intended
|
Bug #6682: HitOnMe doesn't fire as intended
|
||||||
|
Bug #6697: Shaders vertex lighting incorrectly clamped
|
||||||
Bug #6711: Log time differs from real time
|
Bug #6711: Log time differs from real time
|
||||||
Feature #890: OpenMW-CS: Column filtering
|
Feature #890: OpenMW-CS: Column filtering
|
||||||
Feature #1465: "Reset" argument for AI functions
|
Feature #1465: "Reset" argument for AI functions
|
||||||
|
|
|
@ -73,9 +73,10 @@ void main()
|
||||||
vec3 diffuseLight, ambientLight;
|
vec3 diffuseLight, ambientLight;
|
||||||
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
||||||
lighting = diffuseLight + ambientLight;
|
lighting = diffuseLight + ambientLight;
|
||||||
clampLightingResult(lighting);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
clampLightingResult(lighting);
|
||||||
|
|
||||||
gl_FragData[0].xyz *= lighting;
|
gl_FragData[0].xyz *= lighting;
|
||||||
|
|
||||||
#if @radialFog
|
#if @radialFog
|
||||||
|
|
|
@ -194,9 +194,10 @@ void main()
|
||||||
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
||||||
vec3 emission = getEmissionColor().xyz * emissiveMult;
|
vec3 emission = getEmissionColor().xyz * emissiveMult;
|
||||||
lighting = diffuseColor.xyz * diffuseLight + getAmbientColor().xyz * ambientLight + emission;
|
lighting = diffuseColor.xyz * diffuseLight + getAmbientColor().xyz * ambientLight + emission;
|
||||||
clampLightingResult(lighting);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
clampLightingResult(lighting);
|
||||||
|
|
||||||
gl_FragData[0].xyz *= lighting;
|
gl_FragData[0].xyz *= lighting;
|
||||||
|
|
||||||
#if @envMap && !@preLightEnv
|
#if @envMap && !@preLightEnv
|
||||||
|
|
|
@ -87,9 +87,10 @@ void main()
|
||||||
vec3 diffuseLight, ambientLight;
|
vec3 diffuseLight, ambientLight;
|
||||||
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
||||||
lighting = diffuseColor.xyz * diffuseLight + getAmbientColor().xyz * ambientLight + getEmissionColor().xyz;
|
lighting = diffuseColor.xyz * diffuseLight + getAmbientColor().xyz * ambientLight + getEmissionColor().xyz;
|
||||||
clampLightingResult(lighting);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
clampLightingResult(lighting);
|
||||||
|
|
||||||
gl_FragData[0].xyz *= lighting;
|
gl_FragData[0].xyz *= lighting;
|
||||||
|
|
||||||
#if @specularMap
|
#if @specularMap
|
||||||
|
|
Loading…
Reference in a new issue