Facepunch / garrysmod-requests

Feature requests for Garry's Mod
84 stars 24 forks source link

Environment map/multiple "faces" support for render targets #1999

Open chev2 opened 2 years ago

chev2 commented 2 years ago

Details

Being able to create rendertargets with environment map support would be really cool, basically a way to have custom cubemaps.

I believe environment maps make use of VTF "faces". So rendertargets would need a way to set which of its faces is currently being drawn to when the rendertarget is pushed to the stack.

Would (probably) fix Facepunch/garrysmod-issues#2885.

Goldermor commented 2 years ago

This is not how env maps work . All "faces" drawn at the same time. and don't forget that on one rendertarget there may be several env maps

but it's a really good idea to get control of them, at least disabling them on current rendertarget.

it would help a lot.

ZenkakuHiragana commented 1 year ago

Is there any workaround to make a custom cubemap using rendertargets? I've tried making one with TEXTUREFLAGS_ENVMAP set but GMOD refused to make it:

GetRenderTargetEx("test", 64, 64, RT_SIZE_LITERAL, MATERIAL_RT_DEPTH_NONE, 16384, 0, IMAGE_FORMAT_BGR888)

Warning! Creating an RT with TEXTUREFLAGS_ENVMAP! This will cause crashes! Bailing..