public TextureShader(Model model, Matrix4 viewPort, Matrix4 projection, Matrix4 modelView, Vec3f lightDir, Image texture) { this.model = model; transformation = viewPort * projection * modelView; this.lightDir = lightDir.Normalize(); this.texture = texture; }
public NormalMapShader(Model model, Matrix4 viewport, Matrix4 projection, Matrix4 modelView, Vec3f lightDir, Image texture, Image normalMap) { this.model = model; this.lightDir = lightDir.Normalize(); this.texture = texture; this.normalMap = normalMap; uniformM = projection * modelView; uniformMIT = TransposeInverse(uniformM); transformation = viewport * uniformM; }
// use this commit for 6bis lesson: // https://github.com/xamarin/private-samples/commit/ddad38f7787d5e9c065afc91547730ad38e51fd1#diff-8603c43660c04f4d430053b29c80ed15R253 public TangentShader(Model model, Matrix4 viewport, Matrix4 projection, Matrix4 modelView, Vec3f lightDir, Image texture, Image normalMap) { this.model = model; this.lightDir = lightDir.Normalize(); this.texture = texture; // do not need for starting poing this.normalMap = normalMap; // this.specularMap = specularMap; uniformM = projection * modelView; uniformMIT = TransposeInverse(uniformM); transformation = viewport * uniformM; }
public ShadowShader(Model model, Matrix4 viewport, Matrix4 projection, Matrix4 modelView, Matrix4 uniformShadow, Vec3f lightDir, Image texture, Image normalMap, Image specularMap, float[] shadowbuffer, int width) { this.model = model; this.lightDir = lightDir.Normalize(); this.texture = texture; this.normalMap = normalMap; this.specularMap = specularMap; this.shadowbuffer = shadowbuffer; this.width = width; uniformM = projection * modelView; uniformMIT = TransposeInverse(uniformM); transformation = viewport * uniformM; this.uniformShadow = uniformShadow; }
public GouraudShader(Model model, Matrix4 viewPort, Matrix4 projection, Matrix4 modelView, Vec3f lightDir) { this.model = model; transformation = viewPort * projection * modelView; this.lightDir = lightDir.Normalize(); }