Marvin Krüger
Marvin Krüger

Reputation: 137

Use the whole screen to display a shader / material

I created a hlsl shader which is rendering a sierpinski fractal using Raymarching. Currently I have assigned the shader to a material, this material is assigned to a cube which I placed in the scene. So the sierpinski fractal is displayed / rendered on the cube geometry.

How can I use the whole screen / camera view to display my shader? I don’t want to add my shader to a material which I assign to a geometry. Here I selected the cube GO where the material is attached to

Upvotes: 1

Views: 487

Answers (1)

Marvin Krüger
Marvin Krüger

Reputation: 137

In case someone is coming to this question and have the same problem as I had, you can do the following:

  • use a Graphics.Blit to execute a certain shader
  • store this information in a RenderTexture
  • assign this RenderTexture to e.g. a Canvas RawImage.texture

Upvotes: 0

Related Questions