mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 15:23:56 +02:00
update polyvox shader to track changes in packDeferredFragment
This commit is contained in:
parent
c2f2f950fb
commit
1e69f695b4
1 changed files with 4 additions and 1 deletions
|
@ -28,6 +28,9 @@ void main(void) {
|
|||
vec3 worldNormal = cross(dFdy(_worldPosition.xyz), dFdx(_worldPosition.xyz));
|
||||
worldNormal = normalize(worldNormal);
|
||||
|
||||
vec3 specular = DEFAULT_SPECULAR;
|
||||
float shininess = DEFAULT_SHININESS;
|
||||
|
||||
float inPositionX = (_worldPosition.x - 0.5) / voxelVolumeSize.x;
|
||||
float inPositionY = (_worldPosition.y - 0.5) / voxelVolumeSize.y;
|
||||
float inPositionZ = (_worldPosition.z - 0.5) / voxelVolumeSize.z;
|
||||
|
@ -41,5 +44,5 @@ void main(void) {
|
|||
vec3 yzDiffuseScaled = yzDiffuse.rgb * abs(worldNormal.x);
|
||||
vec4 diffuse = vec4(xyDiffuseScaled + xzDiffuseScaled + yzDiffuseScaled, 1.0);
|
||||
|
||||
packDeferredFragment(_normal, 0.0, vec3(diffuse), vec3(0.01, 0.01, 0.01), 10.0);
|
||||
packDeferredFragment(_normal, 1.0, vec3(diffuse), specular, shininess);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue