Skip to content

Commit 9717683

Browse files
committed
补充说明
1 parent e8a6b38 commit 9717683

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

sample_03_box.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ int main(void)
7878
rh.SetPixelShader([&] (PS_Input& input) -> Vec4f {
7979
Vec2f coord = input.varying_vec2f[VARYING_TEXUV]; // 取得纹理坐标
8080
Vec4f tc = texture.Sample2D(coord); // 纹理采样并返回像素颜色
81-
#if 1
8281
return tc; // 返回纹理
83-
#else
84-
Vec4f cc = input.varying_vec4f[VARYING_COLOR];
85-
return tc * cc; // 纹理混合颜色
86-
#endif
8782
});
8883

8984
// 绘制盒子

sample_04_gouraud.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,8 @@ int main(void)
9696
rh.SetPixelShader([&] (PS_Input& input) -> Vec4f {
9797
Vec2f coord = input.varying_vec2f[VARYING_TEXUV]; // 取得纹理坐标
9898
Vec4f tc = texture.Sample2D(coord); // 纹理采样并返回像素颜色
99-
#if 0
100-
return tc; // 返回纹理
101-
#else
10299
float light = input.varying_float[VARYING_LIGHT];
103100
return tc * light;
104-
#endif
105101
});
106102

107103
// 绘制盒子

0 commit comments

Comments
 (0)