Reassembly

Reassembly

Not enough ratings
Texture Example Mod
   
Award
Favorite
Favorited
Unfavorite
Tags: cvars
File Size
Posted
2.160 MB
27 Jun, 2018 @ 3:38am
1 Change Note ( view )

Subscribe to download
Texture Example Mod

Description
Example mod demoing a new graphical modding feature: the ability to load textures.

NOTE that as of publishing you need BETA Reassembly to use this mod.

Place the texture file name right after the fragment shader source in shaders.lua. Textures are automatically loaded. There is a limit of 1 texture per shader, but of course you can use texture atlasing to get around this. Textures are supported on all shaders, not just the new ShaderBackground.

There are several new uniforms available for shaders to use textures:

uniform sampler2D ShaderTex; (texture sampler for specified texture_name);
uniform vec2 ShaderTexRes; (widthxheight of texture_name)
uniform vec2 Resolution; (widthxheight of window in pixels)
uniform float ToPixels; (pixel_size / world_size, converts world sizes into (zoom invariant) pixels sizes)
1 Comments
Safari Mesh 2 Jul, 2018 @ 6:43pm 
cool