Ghost Posted February 22, 2023 Share 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 Link to comment Share on other sites More sharing options...
Ghost Posted February 22, 2023 Author Share Posted February 22, 2023 Quote Link to comment Share on other sites More sharing options...
Alienhead Posted February 22, 2023 Share Posted February 22, 2023 Is that an animated mesh ? Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
havenphillip Posted February 22, 2023 Share 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 Link to comment Share on other sites More sharing options...
Ghost Posted February 24, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
Ghost Posted February 24, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
Ghost Posted February 24, 2023 Author Share Posted February 24, 2023 On 2/22/2023 at 8:03 PM, Alienhead said: Is that an animated mesh ? Yes. Quote Link to comment Share on other sites More sharing options...
havenphillip Posted February 25, 2023 Share 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 Link to comment Share on other sites More sharing options...
Solution havenphillip Posted February 25, 2023 Solution Share 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 Link to comment Share on other sites More sharing options...
Ghost Posted February 25, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
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.