MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / rend_GetAlphaMultiplier

Function rend_GetAlphaMultiplier

renderer/HardwareBaseGPU.cpp:67–90  ·  view source on GitHub ↗

returns the alpha that we should use

Source from the content-addressed store, hash-verified

65
66// returns the alpha that we should use
67float rend_GetAlphaMultiplier() {
68 switch (gpu_state.cur_alpha_type) {
69 case AT_ALWAYS:
70 case AT_TEXTURE:
71 case AT_VERTEX:
72 case AT_TEXTURE_VERTEX:
73 case AT_SATURATE_VERTEX:
74 case AT_SATURATE_TEXTURE_VERTEX:
75 case AT_SPECULAR:
76 return 1.0;
77 case AT_CONSTANT:
78 case AT_CONSTANT_TEXTURE:
79 case AT_CONSTANT_TEXTURE_VERTEX:
80 case AT_CONSTANT_VERTEX:
81 case AT_LIGHTMAP_BLEND:
82 case AT_LIGHTMAP_BLEND_SATURATE:
83 case AT_SATURATE_TEXTURE:
84 case AT_SATURATE_CONSTANT_VERTEX:
85 return gpu_state.cur_alpha / 255.0;
86 default:
87 // Int3(); // no type defined,get jason
88 return 0;
89 }
90}
91
92// Retrieves an error message
93const char *rend_GetErrorMessage() { return Renderer_error_message; }

Callers 2

rend_SetAlphaValueFunction · 0.85
rend_SetAlphaTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected