解决了painting.comp爆炸的问题

dev-VirtualTexture
wuyize 2023-01-19 16:42:40 +08:00
parent f3f3266dc9
commit 53c6a4fbe5
1 changed files with 0 additions and 43 deletions

View File

@ -876,49 +876,6 @@ void drawLine(in float d, in uint styleIndex, out vec4 elementColor, out vec2 me
}
}
void drawLine(in float d, in uint styleIndex, out vec4 elementColor, out vec2 metallicRoughness)
{
elementColor = vec4(1);
metallicRoughness = vec2(0.8);
switch(int(elementData[styleIndex+3]))
{
case 0:
{
elementColor = vec4(elementData[styleIndex+7],elementData[styleIndex+8],elementData[styleIndex+9],1);
metallicRoughness = vec2(elementData[styleIndex+10],elementData[styleIndex+11]);
break;
}
case 1:
{
elementColor = vec4(mix(vec3(0), vec3(1), d), 1);
metallicRoughness = vec2(0,0.8);
break;
}
case 2:
{
float levels[] = {0.25,0.5,0.75};
vec3 colors[] = {vec3(1,0,0), vec3(0,1,0), vec3(0,0,1), vec3(1,1,0)};
int i = 0;
while(i<3)
{
if(d<levels[i])
{
elementColor = vec4(colors[i], 1);
metallicRoughness = vec2(0,0.8);
break;
}
i++;
}
if(i==3)
{
elementColor = vec4(colors[i], 1);
metallicRoughness = vec2(0,0.8);
}
break;
}
}
}
bool drawElement(uint elementIndex, vec2 localUV, out vec3 color, out vec2 metallicRoughness, inout vec3 debugBVH = vec3(0))
{
bool hitElement = false;