Pleca Posted August 18, 2024 Posted August 18, 2024 Hi Josh, what is the current state of decals? When I try to assign my own material, the screen blinks black, and the viewports turn white. Additionally, when I run the game and turn towards a decal with my material, the game freezes. This is happening in a Lua Project; I haven't tried it in C++ yet. Material: Oil_stains.zip Quote
Josh Posted August 18, 2024 Posted August 18, 2024 I think there is probably an error in the shader that is causing a texture read from a sampler from an invalid bindless pointer handle. That's what it means if you see a shader that causes all rendering to stop responding... Quote Let's build cool stuff and have fun.
Solution Josh Posted August 18, 2024 Solution Posted August 18, 2024 I don't understand why, but removing a small bit of code that was not needed anyways fixed the problem: if (mtl.textureHandle[TEXTURE_METALLICROUGHNESS] != uvec2(0)) { vec4 mrsamp = texture(sampler2D(mtl.textureHandle[TEXTURE_METALLICROUGHNESS]), decalcoords); materialInfo.perceptualRoughness = materialInfo.perceptualRoughness * (1.0f - color.a) + mrsamp.y * color.a; materialInfo.metallic = materialInfo.metallic * (1.0f - color.a) + mrsamp.z * color.a; } 1 Quote Let's build cool stuff and have fun.
Josh Posted August 18, 2024 Posted August 18, 2024 update is up now. Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.