I got problem:3D RenderTexture cannot be set as active render target

HI bud, I am engaged in dynamic GI work that obj not need set to static, when you encounter a problem, unity3d4.X no problem, in the 5.x unity3d on the problem:
3D RenderTexture cannot be set as active render target
UnityEngine.Graphics:SetRenderTarget(RenderTexture)
dGI.GLOBAL_ILLUM:OnPostRender(Int32) (at Assets/dynamicGI 1/dGI/GLOBAL_ILLUM.cs:427)
dGI.dynamicGI:method_6() (at Assets/dynamicGI 1/dGI/dynamicGI.cs:679)

Would like to see those methods. Also NEVER, EVER call your methods “method_”. Use descriptive names instead.

2 Likes

ok thks for you replay the part code method below:

public void OnPostRender(int int_2)
{
Vector3 vector4;
Matrix4x4 projectionMatrix;
Camera component;
int num3;
this.method_2(int_2);
this.worldNormalBuffer[int_2][0] = this.colorVolume[int_2][this.int_0].colorBuffer;
this.worldNormalBuffer[int_2][1] = this.normalVolume[int_2].colorBuffer;
float num = Mathf.Tan((Camera.main.fieldOfView * 3.141593f) / 360f) * Camera.main.farClipPlane;
float num2 = num * Camera.main.aspect;
Vector3 vector = -Camera.main.transform.up;
Vector3 right = Camera.main.transform.right;
Vector3 vector3 = (Vector3) (Camera.main.transform.forward * Camera.main.farClipPlane);
Vector3[ ] data = new Vector3[ ] { (vector3 - (vector * num)) - (right * num2), (vector3 - (vector * num)) + (right * num2), (vector3 + (vector * num)) - (right * num2), (vector3 + (vector * num)) + (right * num2) };
this.computeBuffer_0.SetData(data);
RenderTexture active = RenderTexture.active;
Graphics.SetRenderTarget(this.colorVolume[int_2][this.int_0]); ----->got problem here!
…

you said that number with methods because the code is c# decompile code so…
other is that project this project Buddy not update this project any more.