mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Add prc variable to force image bindings as writeonly (#131)
This commit is contained in:
parent
b182224463
commit
3fa5b6b4ee
@ -2486,7 +2486,10 @@ update_shader_texture_bindings(ShaderContext *prev) {
|
||||
bool has_write = param->has_write_access();
|
||||
input._writable = has_write;
|
||||
|
||||
if (has_read && has_write) {
|
||||
if (gl_force_image_bindings_writeonly) {
|
||||
access = GL_WRITE_ONLY;
|
||||
|
||||
} else if (has_read && has_write) {
|
||||
access = GL_READ_WRITE;
|
||||
|
||||
} else if (has_read) {
|
||||
|
@ -299,6 +299,11 @@ ConfigVariableBool gl_support_shadow_filter
|
||||
"cards suffered from a broken implementation of the "
|
||||
"shadow map filtering features."));
|
||||
|
||||
ConfigVariableBool gl_force_image_bindings_writeonly
|
||||
("gl-force-image-bindings-writeonly", false,
|
||||
PRC_DESC("Forces all image inputs (not textures!) to be bound as writeonly, "
|
||||
"to read from an image, rebind it as sampler."));
|
||||
|
||||
ConfigVariableEnum<CoordinateSystem> gl_coordinate_system
|
||||
("gl-coordinate-system", CS_yup_right,
|
||||
PRC_DESC("Which coordinate system to use as the internal "
|
||||
|
@ -80,6 +80,7 @@ extern ConfigVariableBool gl_fixed_vertex_attrib_locations;
|
||||
extern ConfigVariableBool gl_support_primitive_restart_index;
|
||||
extern ConfigVariableBool gl_support_sampler_objects;
|
||||
extern ConfigVariableBool gl_support_shadow_filter;
|
||||
extern ConfigVariableBool gl_force_image_bindings_writeonly;
|
||||
extern ConfigVariableEnum<CoordinateSystem> gl_coordinate_system;
|
||||
|
||||
extern EXPCL_GL void CLP(init_classes)();
|
||||
|
Loading…
x
Reference in New Issue
Block a user