纹理状态使用警告 [英] Texture state usage warning

查看:79
本文介绍了纹理状态使用警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下情况: 我有一种具有2个纹理的材质-漫反射和Alpha蒙版. 在大多数情况下,虽然仍然在相关片段着色器中为其定义了采样器,但不使用alpha蒙版,它可以正常工作,但是如果我打开gl debug输出,则会收到以下警告:

I have the following case: I have a material which has 2 textures -diffuse and alpha mask. In most cases the alpha mask is not used while the sampler for it in the relevant fragment shader still defined.It works ok, but if I turn on gl debug output I am getting the following warning:

严重性:低,消息:纹理状态使用警告:纹理1为基础 级别不一致.检查纹理大小.

Severity:Low ,Message:Texture state usage warning:Texture 1 is base level inconsistent.Check texture size.

当Alpha蒙版目标没有绑定时会产生警告.

The warning is produced when alpha mask target has no binding.

我有2个问题:

  1. 此警告是否会对渲染产生负面影响?
  2. 如果第一个答案是是",那么如何禁用未使用的采样器以免产生这种类型的警告?(某些未在GLSL中使用预处理器的东西,因为它可能会在运行时发生变化)

推荐答案

除非您遇到了一些驱动程序优化伏都教案,否则应该没有任何影响,要禁用此警告,您可能要在alpha具有绑定的情况下使用单独的着色器并且没有约束力.

It should not have any impact, unless you hit some driver optimization voodoo case, to disable this warning you might want to use separate shaders for cases when alpha has binding and does not have binding.

这篇关于纹理状态使用警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆