initial projection material
This commit is contained in:
1 parent
8d52690c97
commit
3ac79b2080
1 file changed
+24
@@ -0,0 +1,24 @@
|
|||||||
|
material {
|
||||||
|
name : TextureProjection,
|
||||||
|
requires : [ position, uv0 ],
|
||||||
|
shadingModel : unlit,
|
||||||
|
doubleSided : true,
|
||||||
|
depthWrite : true,
|
||||||
|
depthCulling : true,
|
||||||
|
vertexDomain: object,
|
||||||
|
parameters : [
|
||||||
|
{
|
||||||
|
type : sampler2d,
|
||||||
|
name : inputTexture
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment {
|
||||||
|
void material(inout MaterialInputs material) {
|
||||||
|
prepareMaterial(material);
|
||||||
|
vec3 viewportCoord = getNormalizedViewportCoord();
|
||||||
|
vec4 sampledColor = texture(materialParams_inputTexture, uvToRenderTargetUV(viewportCoord.xy));
|
||||||
|
material.baseColor = sampledColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user