MCPcopy Create free account
hub / github.com/crosire/reshade / write_texture_format

Function write_texture_format

source/effect_codegen_hlsl.cpp:686–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684 s += '\n';
685 }
686 void write_texture_format(std::string &s, texture_format format)
687 {
688 switch (format)
689 {
690 case texture_format::r32i:
691 s += "int";
692 break;
693 case texture_format::r32u:
694 s += "uint";
695 break;
696 case texture_format::rgba32i:
697 s += "int4";
698 break;
699 case texture_format::rgba32u:
700 s += "uint4";
701 break;
702 case texture_format::r8:
703 case texture_format::r16:
704 case texture_format::rg8:
705 case texture_format::rg16:
706 case texture_format::rgba8:
707 case texture_format::rgba16:
708 case texture_format::rgb10a2:
709 s += "unorm float4";
710 break;
711 default:
712 assert(false);
713 [[fallthrough]];
714 case texture_format::unknown:
715 case texture_format::r16f:
716 case texture_format::r32f:
717 case texture_format::rg16f:
718 case texture_format::rg32f:
719 case texture_format::rgba16f:
720 case texture_format::rgba32f:
721 s += "float4";
722 break;
723 }
724 }
725
726 std::string id_to_name(id id) const
727 {

Callers 2

define_storageMethod · 0.85
define_samplerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected