mirror of
https://github.com/teverse/teverse
synced 2025-08-24 15:14:46 +02:00
Compare commits
No commits in common. "f4e0ae613994a0e78839031244e8adbc71a231ef" and "85dd40e95a71147913d81de471cf7c19c81b3d79" have entirely different histories.
f4e0ae6139
...
85dd40e95a
@ -8,5 +8,22 @@ uniform vec4 u_camPos;
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_FragColor = vec4(encodeNormalUint(v_normal), 0.0);
|
float roughness = v_color1.y;
|
||||||
|
float metalness = v_color1.x;
|
||||||
|
|
||||||
|
GBufferData buffer;
|
||||||
|
buffer.base_color = v_color0.xyz;
|
||||||
|
buffer.ambient_occlusion = 11.0;
|
||||||
|
buffer.world_normal = v_normal.xyz;
|
||||||
|
buffer.roughness = roughness;
|
||||||
|
buffer.emissive_color = vec3(0.0, 0.0, 0.0);
|
||||||
|
buffer.metalness = metalness;
|
||||||
|
buffer.subsurface_color = vec3(1.0, 1.0, 1.0);
|
||||||
|
buffer.subsurface_opacity = 0.0;
|
||||||
|
|
||||||
|
vec4 result[3];
|
||||||
|
encodeGBuffer(buffer, result);
|
||||||
|
gl_FragData[0] = result[0];
|
||||||
|
gl_FragData[1] = result[1];
|
||||||
|
gl_FragData[2] = result[2];
|
||||||
}
|
}
|
@ -29,8 +29,6 @@ void main()
|
|||||||
vec4 tangent = a_tangent * 2.0 - 1.0;
|
vec4 tangent = a_tangent * 2.0 - 1.0;
|
||||||
|
|
||||||
vec3 wnormal = normalize(mul(modelIT, normal.xyz ));
|
vec3 wnormal = normalize(mul(modelIT, normal.xyz ));
|
||||||
wnormal = instMul(model, vec4(wnormal, 1.0) ).xyz;
|
|
||||||
|
|
||||||
vec3 wtangent = normalize(mul(modelIT, tangent.xyz ));
|
vec3 wtangent = normalize(mul(modelIT, tangent.xyz ));
|
||||||
|
|
||||||
vec3 view = mul(u_view, vec4(wpos, 0.0) ).xyz;
|
vec3 view = mul(u_view, vec4(wpos, 0.0) ).xyz;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user