56 :
RenderPassShaderQuad(
device), _sourceTexture(sourceTexture), _premultiplyTexture(options.premultiplyTexture), _options(options)
62 static constexpr const char* CACHE_KEY =
"DownsampleQuad";
63 auto cached =
device->getCachedShader(CACHE_KEY);
66 shaderDefinition.
name = CACHE_KEY;
67 shaderDefinition.
vshader =
"downsampleVertex";
68 shaderDefinition.
fshader =
"downsampleFragment";
70 device->setCachedShader(CACHE_KEY, cached);
85 _sourceInvResolution[0] = _sourceTexture->width() > 0 ? 1.0f /
static_cast<float>(_sourceTexture->width()) : 1.0f;
86 _sourceInvResolution[1] = _sourceTexture->height() > 0 ? 1.0f /
static_cast<float>(_sourceTexture->height()) : 1.0f;
88 _sourceInvResolution[0] = 1.0f;
89 _sourceInvResolution[1] = 1.0f;
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.