Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a runtime virtual texture #245

Open
TokisanGames opened this issue Nov 11, 2023 · 4 comments
Open

Make a runtime virtual texture #245

TokisanGames opened this issue Nov 11, 2023 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@TokisanGames
Copy link
Owner

TokisanGames commented Nov 11, 2023

Description

The shader could be simplified a lot and made a lot faster if the ground textures were baked. It could be part of an optimization where there is an edit mode and a runtime mode. This could save a lot of VRAM as well, since the other textures no longer need to be loaded.

It will facilitate blending objects into the terrain without rendering those objects in the transparency pipeline.

Perhaps this would be helpful as a part of GPU painting.

An RVT could also allow the texturing method to use layers, storing splatmaps on disk and baking them.

For generating a normal map from a heightmap, zylann has one, also:
https://stackoverflow.com/questions/74489139/generating-a-normal-map-from-a-height-map-in-compute-shader
https://gamedev.stackexchange.com/questions/165575/calculating-normal-map-from-height-map-using-sobel-operator
https://github.com/cpetry/NormalMap-Online/blob/gh-pages/javascripts/shader/NormalMapShader.js
https://stackoverflow.com/questions/2368728/can-normal-maps-be-generated-from-a-texture
https://stackoverflow.com/questions/5281261/generating-a-normal-map-from-a-height-map

@TokisanGames TokisanGames mentioned this issue Nov 11, 2023
19 tasks
@Saul2022
Copy link

Sounds pretty cool,though is the runtime virtual texture like virtual texturing?( the one technique that handles like 16k textures), i guess also this will help greatly igpu.

@TokisanGames
Copy link
Owner Author

RVT is a virtual texturing method. I suppose it depends on what specific aspects of virtual texturing you mean.

https://docs.unrealengine.com/5.3/en-US/virtual-texturing-in-unreal-engine/

@Saul2022
Copy link

Saul2022 commented Nov 13, 2023

Nice then though for what i seen in some unity post it seemed like it ran on gles 2 hardware, so that fine also i found some talk that while it says just AVT there are some parts explaining the RVT method https://youtu.be/SVPMhGteeuE?si=AtsW7WkVk0wPtAuq though with a different name i think it in 3:45 , 7:39 and while at 35:57 they don't talk about it they show their references, so that may help.

@TokisanGames TokisanGames added the enhancement New feature or request label Nov 15, 2023
@TokisanGames TokisanGames added this to the Future milestone Nov 15, 2023
@ozzr
Copy link

ozzr commented Dec 9, 2023

Very cumbersome to implement right now, at least from an extension.
The only available implementation of a virtual texture out there for godot engine that I know of is found in the godot_voxel extension from zylan.
Also it would be necessary to have partial texture updates available from the core.
As of now, for my terrain system, I am using Clipmap textures to handle the data streaming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Future Ideas
Development

No branches or pull requests

3 participants