- Home /
Shader Forge post effect yields a black screen
When I make a standard Post Effect shader with Shader Forge, and apply it to the camera, the screen turns black. I have seen some say that if you change it to deferred, and compile this will fix that. (It did at one time, but not with current version of SF). I also have seen that if I remove the Meta Pass from the shader code then it will fix this issue. This does work, but is impractical because you can't make any changes to the shader without having to delete the section of code again. Nowhere have I found why this happens, and how to fix it. Does anyone have any ideas?
Edit: What makes this frustrating for me is that I've seen this question asked from 3 years back to 3 months back. And nobody seems to have a solid solution.
Never used shader forge, but if you want help with the shader it generates it would be helpful if you included that with your question.
Well I do, but that was for a different question I thought. This question was mainly for help on why Shader Forge makes the camera black when a Post Effect shader was applied to it.
As stated here or described in the video http://neatcorporation.com/forums/viewtopic.php?f=6&t=383&p=3110 or https://www.youtube.com/watch?v=TLcDBPnHLD8
The question was asked here as well https://shaderforge.userecho.com/topics/1199-sf-camera-post-effect-does-not-work-with-an-other-image-effect-on-same-camera/
And a solution was described here which didn't work for my current version. https://www.youtube.com/watch?v=LIJD05o$$anonymous$$zic
The reason I didn't ask help for the shader as this is the default shader that Shader Forge creates if you create a Post Effect. I didn't make it. I just apply its shader to my own camera and it does not work unless I manually delete the $$anonymous$$eta pass code every time I compile the shader in Shader Forge.
I don't want help on the this particular shader, I want help on why this is occurring on Post Effect shaders with Shader Forge. I hope that clears up my question some.
Here is the default shader it generates, although this happens with any shader
// Shader created with Shader Forge v1.31
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: $$anonymous$$anually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.31;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:1,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,rpth:0,vtps:1,hqsc:True,nrmq:1,nrsp:0,vomd:1,spxs:False,tesm:0,olmd:1,culm:2,bsrc:4,bdst:1,dpts:6,wrdp:False,dith:0,rfrpo:True,rfrpn:Refraction,coma:15,ufog:False,aust:False,igpj:True,qofs:1,qpre:4,rntp:5,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True;n:type:ShaderForge.SFN_Final,id:2865,x:32358,y:33004,varname:node_2865,prsc:2|emission-4354-RGB,voffset-4177-OUT;n:type:ShaderForge.SFN_TexCoord,id:6793,x:31733,y:33224,varname:node_6793,prsc:2,uv:0;n:type:ShaderForge.SFN_ProjectionParameters,id:8707,x:31733,y:33437,varname:node_8707,prsc:2;n:type:ShaderForge.SFN_RemapRange,id:9496,x:31932,y:33224,varname:node_9496,prsc:2,frmn:0,frmx:1,tomn:-1,tomx:1|IN-6793-UVOUT;n:type:ShaderForge.SFN_Append,id:6538,x:31932,y:33396,varname:node_6538,prsc:2|A-5896-OUT,B-8707-SGN;n:type:ShaderForge.SFN_Vector1,id:5896,x:31733,y:33378,varname:node_5896,prsc:2,v1:1;n:type:ShaderForge.SFN_$$anonymous$$ultiply,id:4177,x:32131,y:33294,varname:node_4177,prsc:2|A-9496-OUT,B-6538-OUT;n:type:ShaderForge.SFN_Color,id:4354,x:32131,y:33143,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_4354,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.427451,c2:0.6784314,c3:0.5411765,c4:1;proporder:4354;pass:END;sub:END;*/
Shader "Shader Forge/NewShader" {
Properties {
_Color ("Color", Color) = (0.427451,0.6784314,0.5411765,1)
}
SubShader {
Tags {
"IgnoreProjector"="True"
"Queue"="Overlay+1"
"RenderType"="Overlay"
}
Pass {
Name "FORWARD"
Tags {
"Light$$anonymous$$ode"="ForwardBase"
}
Blend DstColor Zero
Cull Off
ZTest Always
ZWrite Off
Your answer
Follow this Question
Related Questions
Alpha the edges of an Object 0 Answers
Is there any way to apply different textures to a plane on front and back? 1 Answer
Custom Transparency shader occasionally losing transparency? 1 Answer
Graphics.DrawTexture with Shader not working on iOS? 1 Answer
Post effect shader similar to "Shannara Chronicles" intro's edge smoke effect 0 Answers