@:src({
var pixelColor:Vec4;
var transformedNormal:Vec3;
@const var reflection:Bool;
@param var texture:SamplerCube;
@global var camera:{ var position : Vec3};
var pixelTransformedPosition:Vec3;
function fragment() {
var n = if (reflection) reflect(-normalize(camera.position - pixelTransformedPosition), transformedNormal) else transformedNormal;
pixelColor.rgb *= texture.get(n).rgb;
};
})@:build(hxsl.Macros.buildShader())@:autoBuild(hxsl.Macros.buildShader())