MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / getHalfTint

Function getHalfTint

TheForceEngine/Shaders/textureSampleFunc.h:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97#define OPT_MIPMAPPING 1
98
99vec3 getHalfTint(ivec2 packedColor)
100{
101 int r = (packedColor.x >> 15) & 255;
102 int g = (packedColor.x >> 23) & 255;
103 int b = (packedColor.y >> 15) & 255;
104
105 float scale = 1.0 / 255.0;
106 vec3 tint;
107 tint.x = float(r) * scale;
108 tint.y = float(g) * scale;
109 tint.z = float(b) * scale;
110 return tint;
111}
112
113vec2 scaleUv(vec2 uv, int data)
114{

Callers 1

sampleTextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected