Ghost Posted February 22, 2023 Posted February 22, 2023 I'm using a dissolve shader by Shadmar, but my character is completely glowing red. What am I doing wrong? Even when I change the color of the dissolving, the texture of the character remains red. Quote
Alienhead Posted February 22, 2023 Posted February 22, 2023 Is that an animated mesh ? Quote Alienhead Components and Software
havenphillip Posted February 22, 2023 Posted February 22, 2023 Is it red in the Material Editor? If so it could be your normals alpha channel. Edit: I just saw the picture it looks like it is. The first thing I would do is check your fragData1 lines in the Fragment shader. They should look like: //Normals Output fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a); fragData1.a = 1/255.0; Quote
Ghost Posted February 24, 2023 Author Posted February 24, 2023 On 2/23/2023 at 12:44 AM, havenphillip said: Is it red in the Material Editor? If so it could be your normals alpha channel. Edit: I just saw the picture it looks like it is. The first thing I would do is check your fragData1 lines in the Fragment shader. They should look like: //Normals Output fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a); fragData1.a = 1/255.0; It didn't help. Quote
Ghost Posted February 24, 2023 Author Posted February 24, 2023 On 2/23/2023 at 12:44 AM, havenphillip said: Is it red in the Material Editor? If so it could be your normals alpha channel. Edit: I just saw the picture it looks like it is. The first thing I would do is check your fragData1 lines in the Fragment shader. They should look like: //Normals Output fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a); fragData1.a = 1/255.0; If I change the specular map to completely black, the red color disappears, but the character stops responding to the lighting. Quote
Ghost Posted February 24, 2023 Author Posted February 24, 2023 On 2/22/2023 at 8:03 PM, Alienhead said: Is that an animated mesh ? Yes. Quote
havenphillip Posted February 25, 2023 Posted February 25, 2023 I'm snowed in I have limited power/internet. I'll get back to you on it but it looks like the specular affects it because he made the specular channel and the normals alpha channel the same. I tend to think Shadmar knows what he's doing and I'm not sure why he did it this way but I'm sure the fix will be pretty easy. Quote
Solution havenphillip Posted February 25, 2023 Solution Posted February 25, 2023 You can try changing the bottom of the shader like this. This works in the material editor for me. #if BFN_ENABLED==1 //Best-fit normals fragData1 = texture(texture15,normalize(vec3(normal.x,-normal.y,normal.z))); fragData1.a = fragData0.a; #else //Low-res normals fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a); #endif int materialflags=1; if (ex_selectionstate>0.0) materialflags += 2; fragData1.a = materialflags/255.0; float specular = color_specular.r * 0.299 + color_specular.g * 0.587 + color_specular.b * 0.114; fragData2 = vec4(0.0,0.0,0.0,specular); vec3 dissolve_col = vec3(0,1,0); if (NoiseV<InvAlpha+0.03) fragData2 = vec4(dissolve_col,specular); } 1 Quote
Ghost Posted February 25, 2023 Author Posted February 25, 2023 10 hours ago, havenphillip said: You can try changing the bottom of the shader like this. This works in the material editor for me. #if BFN_ENABLED==1 //Best-fit normals fragData1 = texture(texture15,normalize(vec3(normal.x,-normal.y,normal.z))); fragData1.a = fragData0.a; #else //Low-res normals fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a); #endif int materialflags=1; if (ex_selectionstate>0.0) materialflags += 2; fragData1.a = materialflags/255.0; float specular = color_specular.r * 0.299 + color_specular.g * 0.587 + color_specular.b * 0.114; fragData2 = vec4(0.0,0.0,0.0,specular); vec3 dissolve_col = vec3(0,1,0); if (NoiseV<InvAlpha+0.03) fragData2 = vec4(dissolve_col,specular); } Partially helped, thanks. Alternatively, I can include this material directly after the character's death. 2 Quote
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.