In the shader chunks system, it is posible to access the aPoint?

How and where can I access to the varying vec3 fPosition inside the shader chunks system?
I have no clue of how to do it?

I can do it in a simple shader, but I want to maintain shadows, …

In a simple shader I did:
attributes: {
aPosition: pc.SEMANTIC_POSITION,

in VShader:
varying vec3 fPosition;
void main(void){
fPosition=aPosition.xyz;

}

and in fragmentShader:
varying vec3 fPosition;
void main(void){
if(fPosition.y>(0.5- 1.0*uTime)){
discard;
}
}

Thanks in advance :slight_smile:

Nearly solved it :slight_smile:

Modified de startVS:
this.material.chunks.startVS = [
“varying vec3 fPosition;”,
“void main(void) {”,
“gl_Position = getPosition();”,
“fPosition=vertex_position.xyz;”
].join("\n");

In the Fshader:
varying vec3 fPosition;
void getAlbedo() {
if(fPosition.y>(0.5- 1.0*uTime))

}