Skip to content

Support int type attribute/varying translation from es3 to es1 #75

Description

@KaYaF

If we convert a shader for es3 that contains int type attribute and varying to a shader for es1, we need a technique. This is because the es1 shader does not support int type attribute and varying variables.

An idea is to specify an attribute and varying as float types, and cast the values to int types, as shown below.

in float a_test;

int getTestAttr() {
  return int(a_test);
}

In this case, it may not be possible to get a large integer due to the precision of the float type, so the shader translator needs to output a warning to the console or file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions