Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
GPUShaders::Vert::Object_basic_random Class Reference

Object basic random vertex shader. More...

Public Member Functions

uint baseHash (uint p)
 
vec3 hash31 (int x)
 
void main ()
 

Public Attributes

in vec3 v
 Position.
 
uniform mat4 mvp
 The transformation matrix.
 
out vec3 col
 Interpolated vertex color.
 

Detailed Description

Object basic random vertex shader.

Member Function Documentation

◆ baseHash()

uint GPUShaders::Vert::Object_basic_random::baseHash ( uint  p)
inline

Compute the based hash for a given index.

Parameters
pthe index
Returns
the hash

◆ hash31()

vec3 GPUShaders::Vert::Object_basic_random::hash31 ( int  x)
inline

Generate a random vec3 from an index seed (see http://random.mat.sbg.ac.at/results/karl/server/node4.html).

Parameters
xthe seed
Returns
a random vec3

◆ main()

void GPUShaders::Vert::Object_basic_random::main ( )
inline

Apply the MVP transformation to the input vertex. Color each face with a random color.


The documentation for this class was generated from the following file: