public void setQuadUnit(Context3D context3D, FragementShader fragementShader, v2f i0, v2f i1, v2f i2, v2f i3) { unit0.initData(i0, context3D, fragementShader); unit1.initData(i1, context3D, fragementShader); unit2.initData(i2, context3D, fragementShader); unit3.initData(i3, context3D, fragementShader); unit0.dpdx_v1 = unit0; unit0.dpdx_v2 = unit1; unit0.dpdy_v1 = unit0; unit0.dpdy_v2 = unit2; unit1.dpdx_v1 = unit0; unit1.dpdx_v2 = unit1; unit1.dpdy_v1 = unit1; unit1.dpdy_v2 = unit3; unit2.dpdx_v1 = unit2; unit2.dpdx_v2 = unit3; unit2.dpdy_v1 = unit0; unit2.dpdy_v2 = unit2; unit3.dpdx_v1 = unit2; unit3.dpdx_v2 = unit3; unit3.dpdy_v1 = unit1; unit3.dpdy_v2 = unit3; }
internal void initData(v2f input, Context3D context3D, FragementShader shader) { this.input = input; this.samplers = context3D.samplers; this.output = new float4(0, 0, 0, 0); fragementShader = shader; isdiscard = false; }
public void upload(VertexShader vertexShader, FragementShader fragementShader) { this.vertexShader = vertexShader; this.fragementShader = fragementShader; }