mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 01:20:13 +02:00
Added separate scribe function to evalGlobalLightingAlphaBlendedWithHaze to shorten shader C string
This commit is contained in:
parent
8985514a31
commit
24692f13fd
6 changed files with 11 additions and 5 deletions
|
@ -203,6 +203,12 @@ vec3 evalGlobalLightingAlphaBlended(mat4 invViewMat, float shadowAttenuation, fl
|
|||
|
||||
return color;
|
||||
}
|
||||
<@endfunc@>
|
||||
|
||||
<@func declareEvalGlobalLightingAlphaBlendedWithHaze()@>
|
||||
|
||||
<$declareLightingAmbient(1, 1, 1)$>
|
||||
<$declareLightingDirectional()$>
|
||||
|
||||
vec3 evalGlobalLightingAlphaBlendedWithHaze(
|
||||
mat4 invViewMat, float shadowAttenuation, float obscurance, vec3 position, vec3 normal,
|
||||
|
|
|
@ -47,7 +47,7 @@ void main(void) {
|
|||
<$evalMaterialEmissive(emissiveTex, emissive, matKey, emissive)$>;
|
||||
|
||||
vec3 viewNormal;
|
||||
<$tangentToViewSpaceLOD(_position, normalTex, _normal, _tangent, viewNormal)$>
|
||||
<$tangentToViewSpaceLOD(_position, normalTex, _normal, _tangent, viewNormal)$>
|
||||
|
||||
float scattering = getMaterialScattering(mat);
|
||||
<$evalMaterialScattering(scatteringTex, scattering, matKey, scattering)$>;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<@include DeferredGlobalLight.slh@>
|
||||
|
||||
<$declareEvalGlobalLightingAlphaBlended()$>
|
||||
<$declareEvalGlobalLightingAlphaBlendedWithHaze()$>
|
||||
|
||||
<@include LightLocal.slh@>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<@include DeferredGlobalLight.slh@>
|
||||
|
||||
<$declareEvalGlobalLightingAlphaBlended()$>
|
||||
<$declareEvalGlobalLightingAlphaBlendedWithHaze()$>
|
||||
|
||||
<@include LightLocal.slh@>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
//
|
||||
|
||||
<@include DeferredGlobalLight.slh@>
|
||||
<$declareEvalGlobalLightingAlphaBlended()$>
|
||||
<$declareEvalGlobalLightingAlphaBlendedWithHaze()$>
|
||||
|
||||
<@include graphics/Material.slh@>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<@include DeferredBufferWrite.slh@>
|
||||
<@include DeferredGlobalLight.slh@>
|
||||
<$declareEvalGlobalLightingAlphaBlended()$>
|
||||
<$declareEvalGlobalLightingAlphaBlendedWithHaze()$>
|
||||
|
||||
<@include gpu/Transform.slh@>
|
||||
<$declareStandardCameraTransform()$>
|
||||
|
|
Loading…
Reference in a new issue