Sign in to follow this  
gduser418

Generating a 3D Texture from multiple Pixel Shaders or Compute Shader

Recommended Posts

I have a program that basically takes an input frame (2D texture) and some a 3d texture and generate a new frame for output. Each output pixel is calculated based on the corresponding input frame pixel and the 3d texture.

 

The above task can easily done with a pixel shader that has the input texture coordinates corresponding to the input frame.

 

But I have another task to calculate the 3d texture based on another 3d texture (of same dimension). Can I fit this into a pixel shader too? Note that this is a 3D texture and the input tex coordinate in the frame input is a 2D input, but here I need the input tex coordinates to be 3D, and of course the dimension is different from the frame size.

 

Do I need a different vertex shader for this then? Or would some other shader like compute shader do the job? I tried to find some compute shader samples but it seems they are dealing with raw input buffers instead of textures. I don't even know how to input a texture to the compute shader.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this