Profiling - tracks GPU and CPU usage as well as displaying performance metrics and scene information

This commit is contained in:
Halbear 2026-06-12 19:51:53 +01:00
parent c9844fc415
commit 620838a41d
22 changed files with 827 additions and 81 deletions

View file

@ -20,14 +20,12 @@ vec4 gamma(vec4 color){
return color = vec4(pow(color.rgb,vec3(GAMMA_CONST)),color.a);
}
vec4 msaa(int sampleCount, sampler2DMS textureIn,vec2 TextCoord){
ivec2 pixelCoords = ivec2(TextCoord * textureSize(textureIn));
vec4 colorSum = vec4(0.0);
for(int i = 0; i < sampleCount; ++i) {
vec4 sampleColor = texelFetch(textureIn, pixelCoords, i);
sampleColor.rgb = sampleColor.rgb / (sampleColor.rgb + vec3(1.0));
colorSum += sampleColor;
}
return colorSum / float(sampleCount);