gpt4 book ai didi

ios - 扩展 EXT_shader_texture_lod 不适用于 OpenGL ES 3.0 iOS

转载 作者:行者123 更新时间:2023-11-29 11:49:13 25 4
gpt4 key购买 nike

即使 glGetString (GL_EXTENSIONS) 调用说扩展存在

GL version:   OpenGL ES 3.0 Apple A8 GPU - 95.58
GL vendor: Apple Inc.
GL renderer: Apple A8 GPU
GLSL version: OpenGL ES GLSL ES 3.00
GLSL extensions:
1 > GL_OES_standard_derivatives
2 > GL_KHR_texture_compression_astc_ldr
3 > GL_EXT_color_buffer_half_float
4 > GL_EXT_debug_label
5 > GL_EXT_debug_marker
6 > GL_EXT_pvrtc_sRGB
7 > GL_EXT_read_format_bgra
8 > GL_EXT_separate_shader_objects
9 > GL_EXT_shader_framebuffer_fetch
10 > GL_EXT_shader_texture_lod <--------------------
11 > GL_EXT_shadow_samplers
12 > GL_EXT_texture_filter_anisotropic
13 > GL_APPLE_clip_distance
14 > GL_APPLE_color_buffer_packed_float
15 > GL_APPLE_copy_texture_levels
16 > GL_APPLE_rgb_422
17 > GL_APPLE_texture_format_BGRA8888
18 > GL_IMG_read_format
19 > GL_IMG_texture_compression_pvrtc

着色器似乎忽略了 textureLod 调用中的 level 参数。视觉结果与 texture 相同。我用 renderdoc 检查了一下,纹理已经生成了 mipmap。 mag 过滤模块也使用 LINEAR_MIPMAP_LINEAR。另外,我确定 level 参数是正确的。

此外,当我在开头插入此语句时着色器编译失败使用 #version 100 和扩展编译成功。

我没有尝试完全切换到#version 100,我不确定它是否有效。

我的问题是为什么我无法编译带有 texture_lod 扩展的 300 es 着色器,即使它存在于设备上?

最佳答案

My question is why I can't compile 300 es shader with the texture_lod extension even though it is present on the device?

...因为它是专门针对 OpenGL ES ES 2.x 着色器的扩展 (#version 100)。

textureLod() 的支持是 OpenGL ES 3.x ESSL #version 300 中的核心配置文件,因此您不需要扩展 ...

关于ios - 扩展 EXT_shader_texture_lod 不适用于 OpenGL ES 3.0 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41986625/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com