如何在GLSL中使用char字符串?

问题描述 投票:0回答:1

如何使用GLSL中的char sumbols?测试https://www.shadertoy.com/new

int c = int('a'); // Not work

如何获得一个sumbol或字符串?用于通话功能。

DrawString("Hello world!"); // Example

我可以做到,但是很难:

#define _H 72
DrawString(_H, _e, _l, _l, _o);
char glsl
1个回答
0
投票

字符串和字符文字在GLSL中不存在。您可以创建整数数组,其中数组值表示某种字符,但仅此而已。

© www.soinside.com 2019 - 2024. All rights reserved.