Can you add shader code to a .tres file?
Asked Answered
R

3

0

Is it possible to add shader code to a .tres file? Im messing around with this voxel project: https://github.com/Zylann/voxelgame/tree/godot4
Each voxel's data is stored in a file called voxel_library.tres. Each voxel inside of voxel_library.tres has its own material section in which you can load one of three types of .tres files that represent a material type. One for foliage one for solids and one for transparent voxels.
My question is how can I find and edit the shader code of those material.tres files?
When I open the, terrain_material_transparent.tres, for example, I dont see any section for shader code...
But I know the shader code is unique for each of the three materials...

Rigveda answered 17/7, 2022 at 18:17 Comment(0)
M
0

These look like standard materials (the materials that come with the engine). If you open the project, and then click on the material in the inspector, there is a drop down arrow next to the name, click that and then convert to shader material. Then you can edit the code.

Metatarsus answered 17/7, 2022 at 18:38 Comment(0)
R
0

Metatarsus Thanks! But what do you mean by "click on the material"? What is the material? I thought the material was the .tres file?
Do you mean material_override inside each voxel's material slot inside voxel_library.tres? If so, that seems tedious to copy and paste shader code for each voxel

Rigveda answered 17/7, 2022 at 20:19 Comment(0)
M
0

I'm not familiar with that project so I'm not sure.

Metatarsus answered 17/7, 2022 at 21:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.