Is it currently possible to use something like bump offset on a float 3, rather then a texture sample? Eg how I do modify the UV’s of the Float 3… I currently have a noise algorithm that helps generate planets and such and I’m trying to use part of it with a cool bump offset effect I’ve previously used with a texture sample before.
I feel like I’m missing something very obvious here
Please read my reply here to see the difference between Texture Objects and Texture Samples.
tldr: Once sampled, a texture sample is just a color value for every pixel so there no ability to tell that sample to be from somewhere else. TextureObjects allow the reference to the texture itself to be passed so that multiple lookups can be performed.
Bumpoffset doesn’t require a TextureObject since it only uses 1 sample, but it does have to be done on on the INPUT side to the texture sample, meaning by adding the bump offset coordinates to the input UVs. You can’t do it after the sample since there is no texture at that point.
I guess my next question is would it be possible to somehow emulate the effect of parallax mapping or bump offset somehow else? This is the effect I currently have, which is used by sampling a outline texture multiple times and using increased offset on the outline effect and adding them all up, which creates a 3d effect when its rotated.
The thing is I’m now trying to generate planets procedurally using noise, so I cant use texture sample anymore and thus no UV input. (I mean I guess I could create them outside the program and randomly choose a texture but that would defeat the purpose).
The only method using noise is to have complete copies of your noise graph with offset positions. You can treat the positions going into the noise just like you would the UVs of the textures you are talking about offsetting. it helps if you can condense you entire procedural bit into a material function with position input so that you can easily sample multiple offsets. It might get expensive fast though, depending on what noise methods you use. The only one that will have any chance to stay performant will be FastGradient_3DTexture. Its several times faster than all the rest.