Jump to content

State of terrain texture channels


LukasPJ

Recommended Posts

Hey guys,


I'm a bit busy at the moment, so just wanted to ask it here:

What is the state of the terrain texture channels? Which channels and textures are used for what? And are there any free channels? There was some talk that Deferred Shading might clear something up.

Link to comment
Share on other sites

A) https://github.com/GarageGames/Torque3D/blob/development/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp#L1180


Kept your reserved channel in the gbuffer in the #color buffer in place for blending to play with


B) https://github.com/GarageGames/Torque3D/blob/development/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp#L1218 stand in for #material though odds are come pbr we'l want to fill that gba with the usual smooth/ao/metal for projected reflectivity


C) the #material slot gets filled via https://github.com/GarageGames/Torque3D/blob/ee6d9961e3ccae0adb7d10a804eda40cbce73893/Engine/source/materials/processedShaderMaterial.cpp#L1155 and referenced via https://github.com/GarageGames/Torque3D/blob/ee6d9961e3ccae0adb7d10a804eda40cbce73893/Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl#L199-L207 so if you absolute need to treat terrain like a speci snowflake, that's quite possible (at the moment head's only using 2 'bits' out of the 8 potential), though


D) since we combine the results one frame behind via https://github.com/GarageGames/Torque3D/blob/ee6d9961e3ccae0adb7d10a804eda40cbce73893/Templates/Full/game/core/scripts/client/lighting/advanced/deferredShading.cs#L58-L59 + https://github.com/GarageGames/Torque3D/blob/ee6d9961e3ccae0adb7d10a804eda40cbce73893/Templates/Full/game/core/scripts/client/lighting/advanced/deferredShading.cs#L68 + https://github.com/GarageGames/Torque3D/blob/ee6d9961e3ccae0adb7d10a804eda40cbce73893/Templates/Full/game/core/scripts/client/renderManager.cs#L52 should have no particular issues slipping things in in it's own step if needed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...