Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sampling Geometry for Textures

#1
This is a crazy...good idea that popped into my head, give a quick listen.

Struggling with that relief map shader code made me want to find a better method of rendering the 3dish look. First off:

Jaykay, if it's truly clipping the heightmap(looks like it is Tongue ) then what if we jitter in values slightly larger than 1, thus exceeding the bounds of the texture.

Anyways, the idea:

Take our wonderful texture, and offscreen, map it to geometry based on the height/normal map. Keep that offscreen in the GPU memory. When an object needs that texture, grab all the light sources, and shine them on the offscreen texture. Then apply gloss/cubemaps to the offscreen texture. Using the position of the texture in the image being rendered on screen, find the point that intersects based on camera angle and that position. Use it as the texture. It should require far less passes then relief mapping, and without realtime lighting would allow someone unable to use relief mapping to have a 3d effect with little performance hit(in theory). I'll try to get some example images when I get home. The time saver is the reuse factor. Without having to account for lighting(and the big lighting hit is the relief map and not the geometry) the same exact offscreen item could be used for every instance of that texture in the scene. Granted, applying cubemapping requires a little extra GPU time, but the performance hit vs using relief mapping should be rather nice.
Reply

#2
+1
I'm making Liblast - a FOSS online FPS game made with Godot 4 and a 100% open-source toolchain
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  ex textures and gpl ...... the post that will probably make everyone hate me .... hutty 16 15,157 11-06-2012, 01:54 PM
Last Post: Mr. Bougo
  netradiant textures not loading tangerian 1 4,019 06-05-2012, 01:34 AM
Last Post: PinkRobot
Exclamation Buggy textures in need of fixing! MirceaKitsune 22 20,678 07-14-2011, 01:34 AM
Last Post: Minkovsky

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-