Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 685 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!