瀏覽代碼

btphystest: use discard in fragment shader instead of AlphaFunc.

undefined
Sam Hocevar 11 年之前
父節點
當前提交
4f66a49fc2
共有 2 個檔案被更改,包括 5 行新增3 行删除
  1. +0
    -2
      test/btphystest.cpp
  2. +5
    -1
      test/front_camera_sprite.lolfx

+ 0
- 2
test/btphystest.cpp 查看文件

@@ -58,8 +58,6 @@ BtPhysTest::BtPhysTest(bool editor)
{
m_loop_value = .0f;

g_renderer->SetAlphaFunc(AlphaFunc::Greater, 0.0);

#if CAT_MODE
/* cat datas setup */
m_cat_texture = Tiler::Register("data/CatsSheet.png", ivec2(0), ivec2(0,1));


+ 5
- 1
test/front_camera_sprite.lolfx 查看文件

@@ -45,5 +45,9 @@ const float PI = 3.14159265358979323846264;

void main(void)
{
gl_FragColor = texture2D(in_texture, pass_texcoord.xy) * pass_color;
vec4 color = texture2D(in_texture, pass_texcoord.xy);
if (color.a < 0.01)
discard;
gl_FragColor = color * pass_color;
}


Loading…
取消
儲存