mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 10:48:34 +02:00
+ | Texture parse
This commit is contained in:
@ -105,12 +105,12 @@ uniform sampler2D sphereTexture;
|
||||
|
||||
void calculateLightColor(GPUMaterial mat, hitInfo hit, inout vec3 color, inout vec3 light, inout uint rng_state)
|
||||
{
|
||||
// if (objects[hit.obj_index].type == 0)
|
||||
// {
|
||||
// vec2 uv = getSphereUV(hit.normal);
|
||||
// color *= texture(sphereTexture, uv).rgb;
|
||||
// }
|
||||
// else
|
||||
if (objects[hit.obj_index].type == 0)
|
||||
{
|
||||
vec2 uv = getSphereUV(hit.normal);
|
||||
color *= texture(sphereTexture, uv).rgb;
|
||||
}
|
||||
else
|
||||
color *= mat.color;
|
||||
light += mat.emission * mat.color;
|
||||
// light += sampleLights(hit.position, rng_state);
|
||||
|
Reference in New Issue
Block a user