mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 10:33:27 +02:00
Removed reference to LIghtingModel.slh in teh DefereedBufferWrite.slh to avoid side effects
This commit is contained in:
parent
4742f40128
commit
3e7126f5be
2 changed files with 3 additions and 9 deletions
libraries/render-utils/src
|
@ -12,7 +12,6 @@
|
|||
<@def DEFERRED_BUFFER_WRITE_SLH@>
|
||||
|
||||
<@include DeferredBuffer.slh@>
|
||||
<@include LightingModel.slh@>
|
||||
|
||||
|
||||
layout(location = 0) out vec4 _fragColor0;
|
||||
|
@ -40,7 +39,6 @@ void packDeferredFragment(vec3 normal, float alpha, vec3 albedo, float roughness
|
|||
if (alpha != 1.0) {
|
||||
discard;
|
||||
}
|
||||
emissive *= isEmissiveEnabled();
|
||||
_fragColor0 = vec4(albedo, ((scattering > 0.0) ? packScatteringMetallic(metallic) : packShadedMetallic(metallic)));
|
||||
_fragColor1 = vec4(packNormal(normal), clamp(roughness, 0.0, 1.0));
|
||||
_fragColor2 = vec4(((scattering > 0.0) ? vec3(scattering) : emissive), occlusion);
|
||||
|
@ -48,7 +46,6 @@ void packDeferredFragment(vec3 normal, float alpha, vec3 albedo, float roughness
|
|||
_fragColor3 = vec4(emissive, 1.0);
|
||||
}
|
||||
|
||||
|
||||
void packDeferredFragmentLightmap(vec3 normal, float alpha, vec3 albedo, float roughness, float metallic, vec3 fresnel, vec3 lightmap) {
|
||||
if (alpha != 1.0) {
|
||||
discard;
|
||||
|
@ -57,11 +54,8 @@ void packDeferredFragmentLightmap(vec3 normal, float alpha, vec3 albedo, float r
|
|||
_fragColor0 = vec4(albedo, packLightmappedMetallic(metallic));
|
||||
_fragColor1 = vec4(packNormal(normal), clamp(roughness, 0.0, 1.0));
|
||||
_fragColor2 = vec4(lightmap, 1.0);
|
||||
|
||||
_fragColor3 = vec4(lightmap * isLightmapEnabled(), 1.0);
|
||||
if (isAlbedoEnabled() > 0.0) {
|
||||
_fragColor3.rgb *= albedo;
|
||||
}
|
||||
|
||||
_fragColor3 = vec4(lightmap * albedo, 1.0);
|
||||
}
|
||||
|
||||
void packDeferredFragmentUnlit(vec3 normal, float alpha, vec3 color) {
|
||||
|
|
|
@ -20,7 +20,7 @@ struct LightingModel {
|
|||
vec4 _ShowContourObscuranceSpare2;
|
||||
};
|
||||
|
||||
uniform lightingModelBuffer {
|
||||
uniform lightingModelBuffer{
|
||||
LightingModel lightingModel;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue