You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Fix SHADER_UNIFORM_NAMES
This commit is contained in:
@@ -3403,8 +3403,20 @@ RID RenderingDevice::index_array_create(RID p_index_buffer, uint32_t p_index_off
|
||||
/**** SHADER ****/
|
||||
/****************/
|
||||
|
||||
// Keep the values in sync with the `UniformType` enum (file rendering_device_commons.h).
|
||||
static const char *SHADER_UNIFORM_NAMES[RenderingDevice::UNIFORM_TYPE_MAX] = {
|
||||
"Sampler", "CombinedSampler", "Texture", "Image", "TextureBuffer", "SamplerTextureBuffer", "ImageBuffer", "UniformBuffer", "UniformBufferDynamic", "StorageBuffer", "StorageBufferDynamic", "InputAttachment"
|
||||
"Sampler",
|
||||
"CombinedSampler", // UNIFORM_TYPE_SAMPLER_WITH_TEXTURE
|
||||
"Texture",
|
||||
"Image",
|
||||
"TextureBuffer",
|
||||
"SamplerTextureBuffer",
|
||||
"ImageBuffer",
|
||||
"UniformBuffer",
|
||||
"StorageBuffer",
|
||||
"InputAttachment",
|
||||
"UniformBufferDynamic",
|
||||
"StorageBufferDynamic",
|
||||
};
|
||||
|
||||
String RenderingDevice::_shader_uniform_debug(RID p_shader, int p_set) {
|
||||
|
||||
@@ -630,6 +630,7 @@ public:
|
||||
|
||||
static const uint32_t MAX_UNIFORM_SETS = 16;
|
||||
|
||||
// Keep the enum values in sync with the `SHADER_UNIFORM_NAMES` values (file rendering_device.cpp).
|
||||
enum UniformType {
|
||||
UNIFORM_TYPE_SAMPLER, // For sampling only (sampler GLSL type).
|
||||
UNIFORM_TYPE_SAMPLER_WITH_TEXTURE, // For sampling only, but includes a texture, (samplerXX GLSL type), first a sampler then a texture.
|
||||
|
||||
Reference in New Issue
Block a user