graphics - Is it expensive to do trilinear texture mapping in a shader? -


imagine big procedural world worths more 300k triangles (about 5-10k per 8x8x8m chunk). since it's procedural, need create data code. i've managed make normal smoothing algorithm, , i'm going use textures (everyone needs textures, don't want walk around simple-colored world, you?). problem don't know it's better calculate uv sets on (i'm using triplanar texture mapping).

have 3 approaches:
1. calculations on cpu, upload gpu (mesh not being modified every frame - 90% of time stays static, calculations done per chunk when chunk changes);

2. calculations on gpu using vertex shader (calculations done for every triangle in every frame, meshes kinda big - expensive every frame?);

3. move algorithm onto opencl (calculations done per chunk when chunk changes, use opencl meshing of data) , call kernel when mesh being changed (inexpensive, opencl experience based on modifying existing code, still have c background, may take long time before i'll work);

approach better in respect little experiment little heavy mid-range hardware?

i'm using c# (.net 4.0) slimdx , cloo.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -