Jump to content
  • Advertisement
Sign in to follow this  
Jamie Shelley

Texture sampling methods

This topic is 1094 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

Hellooo. Just wondering if anyone has any ideas on the following:

At it's simplest: I'm trying to sample a texture (3D texture -think MRI scans) within a certain area. Then create a texture from that area and resize it up to the previous res - using noise as a pixel interpolation method (simplex or wang hash are the best contenders for erm.. reasons biggrin.png).

What I have working coded so far: 

A 'dev' interface that does the following:
.Create and or reference 2D Texture 'slices' from surface noise shaders or artists brains (Indirectly ofc, cursed ethics).
.Makes a 3D texture from this data.
.Send this data in the form of an alpha map and 3DTexture buffer to a custom ray-cast based shader.
.Render data volumetrically (allows camera to zoom 'inside' data). 
.saves into custom format for future reference (E.g 'zooming' back out).

What I have tried toward fixing this problem:
GPU methods:
Sending a texture in, adding noise and reading another out

(Ignoring unreliable consume buffers) the time for completion varies between data requested and the client's machine. 
Getting data from a compute shader is unreliable, and CPU processes cannot be synced with thread execution (to my knowledge at least)


CPU methods

A tonne of for loops by percentage referencing ETC

stupendous processing times

What I have in mind for potential solutions
Using the ray cast system allready implemented to grab all visible textures and perform filtering

Precalcing (with this dev tool) for textures all possible blocks (Lets just call them Voxels) - from my maths it would end up being 80GB'S - pretty steep but not that unreasonable considering games in development (Thinking Star Citizen)

Share this post

Link to post
Share on other sites

Okaay think I have a solution

In short:

it's waaay to intensive; solution: generated tiled LOD0 map, then down sample.
In HLSL, you have to use MRT (Multiple Render Targets) and set a branch conditional for the sample output (obviously)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!