INPUT mediump vec2 aPosition;
uniform highp mat4 uMvpMatrix;
uniform highp vec3 uSize;
-uniform mediump vec4 pixelArea;
OUTPUT mediump vec2 vTexCoord;
void main()
{
+ vTexCoord = aPosition + vec2(0.5);
gl_Position = uMvpMatrix * ComputeVertexPosition();
- vTexCoord = pixelArea.xy+pixelArea.zw*(aPosition + vec2(0.5) );
}
}
else
{
- resourceStatus = Toolkit::Visual::ResourceStatus::FAILED;
- mLoadState = TextureManager::LoadState::LOAD_FAILED;
+ resourceStatus = Toolkit::Visual::ResourceStatus::FAILED;
+ mLoadState = TextureManager::LoadState::LOAD_FAILED;
// Change renderer as broken.
ShowBrokenImage();
{
Shader shader;
- bool usesWholeTexture = true;
const bool useStandardShader = !mImpl->mCustomShader;
const bool useNativeImage = (mTextures && DevelTexture::IsNative(mTextures.GetTexture(0)));
}
else
{
+ bool usesWholeTexture = true;
std::string_view vertexShaderView;
std::string_view fragmentShaderView;
{
shader = Shader::New(vertexShaderView, fragmentShaderView, mImpl->mCustomShader->mHints);
}
- }
- if(usesWholeTexture)
- {
- shader.RegisterProperty(PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT);
+ if(usesWholeTexture)
+ {
+ shader.RegisterProperty(PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT);
+ }
}
return shader;
const int CUSTOM_PROPERTY_COUNT(5); // anim,premul,size,offset,multicol
-const Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
-
/**
* Return Property index for the given string key
* param[in] stringKey the string index key
mTextShaderFeatureCache = featureBuilder;
Shader shader = mTextVisualShaderFactory.GetShader(factoryCache, mTextShaderFeatureCache);
- shader.RegisterProperty(PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT);
return shader;
}