bgfx/examples/49-hextile/vs_hextile.sc
blackhole a8a10b0b89
Adds example 49-hextile (#2922)
* First commit - tested with dx11 on windows

* Minor changes & adding some comments.

* Update hextile.cpp

* update some bin files

* rename texture

* minor comment update

* Added support to configure tile rate as well as tile rotation strength, update bin files & screenshot

* use texture from polyhaven, updated screenshot, updated bin files & minor changes to shader.

* missed pushing texture

* update license

* Update hextile.cpp

* Fix regular tiling

* use ktx with mipmaps

* minor change to ensure that regular tiling & hextile matches with default tile rate.

* minor c

Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2022-09-15 19:03:07 -07:00

19 lines
433 B
Python

$input a_position, a_texcoord0
$output v_position, v_texcoord0
/*
* Copyright 2015 Andrew Mac. All rights reserved.
* License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*/
#include "../common/common.sh"
void main()
{
vec3 vp = mul(u_model[0], vec4(a_position.xyz, 1.0)).xyz;
v_position = vp;
v_texcoord0 = mul(u_model[0], vec4(a_texcoord0.xy, 1.0, 1.0)).xy;
gl_Position = mul(u_viewProj, vec4(vp.xyz, 1.0));
}