Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ This is the same as using shader_set() and then using shader_reset(), nothing mu

# Uniforms

Every Shade element stores a list of uniform ids, and you have full control on which are loaded with `loadUni(* uniform name *)`,
to apply a value to an uniform, you then use `applyUni(* uniform name *, * value *, [variable type])`<br>
Every Shade element stores a list of uniform ids, and you have full control on which are loaded with `loadUniform(* uniform name *)`,
to apply a value to an uniform, you then use `applyUniform(* uniform name *, * value *, [variable type])`<br>
```
myShade.loadUni("u_time");
myShade.loadUniform("u_time");

myShade.applyUni("u_time", current_time, UniTypes.f);
myShade.applyUniform("u_time", current_time, UNIFORMTYPES.f);
```

`loadUni()` is not necessary since `applyUni()` will load the uniform id if it wasn't loeaded before, but you can use it if you want.
`loadUniform()` is not necessary since `applyUniform()` will load the uniform id if it wasn't loeaded before, but you can use it if you want.
<br>

### UniTypes list
### UNIFORMTYPES list

* f - float
* f_array - float array
Expand All @@ -44,9 +44,10 @@ myShade.applyUni("u_time", current_time, UniTypes.f);

# Samplers

Samplers / textures work the same way as uniforms, but instead use `loadSampler(* sampler name *)` and `applyTexture(* sampler name *, * texture *)`<br>
Samplers / textures work the same way as uniforms, but instead use `loadSampler(* sampler name *)` and `applyTexture(* sampler name *, * texture *, * image index *)`<br>
```
myShade.loadSampler("s_grass");

myShade.applyTexture("s_grass", sprite_get_texture(spr_grass,0) );
// use the spr_grass sprite on index 1
myShade.applyTexture("s_grass", spr_grass, 1);
```
63 changes: 30 additions & 33 deletions Shade/Shade.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 32 additions & 30 deletions Shade/objects/obj_shadeTest/obj_shadeTest.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions Shade/options/android/options_android.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions Shade/options/html5/options_html5.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions Shade/options/ios/options_ios.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 24 additions & 22 deletions Shade/options/linux/options_linux.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading