结构体

GLSL
struct Vertex {
	vec3 position;
}
点击展开查看更多
GLSL
void main() {
	Vertex vtx;
	vtx.position = vec3(1);
}
点击展开查看更多

接口块

GLSL
out VertexOut {
	vec3 normal;
	vec2 texCoord;
} vs_out;
点击展开查看更多
GLSL
in VertexOut {
    vec3 normal;
    vec2 texCoord;
} vs_in;
点击展开查看更多
GLSL
void main() {
	vs_out.normal = vec3(1);
}
点击展开查看更多

版权声明

作者: Chaim

链接: https://chaim.eu.org/posts/%E7%BB%93%E6%9E%84%E4%BD%93-%E5%92%8C-%E6%8E%A5%E5%8F%A3%E5%9D%97/

许可证: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键