/usr/share/psychtoolbox-3/PsychOpenGL/PsychGLSLShaders/BasicPerlinNoiseShader.vert.txt is in psychtoolbox-3-common 3.0.11.20140816.dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | /*
* File: BasicPerlinNoiseShader.vert.txt
* Shader for drawing of basic perlin noise 2D patches.
*
* This is the vertex shader. It takes the attributes (parameters)
* provided by the Screen('DrawTexture(s)') command, performs some
* basic calculations on it - the calculations that only need to be
* done once per patch and that can be reliably carried out
* at sufficient numeric precision in a vertex shader - then it passes
* results of computations and other attributes as 'varying' parameters
* to the fragment shader.
*
* (c) 2011-2012 Mario Kleiner. Licensed under MIT license.
*/
/* Attributes passed from Screen(): See the ProceduralShadingAPI.m file for infos: */
attribute vec4 sizeAngleFilterMode;
attribute vec4 modulateColor;
attribute vec4 auxParameters0;
/* Information passed to the fragment shader: */
varying vec4 baseColor;
varying float seed;
varying vec2 texSize;
void main()
{
/* Apply standard geometric transformations to patch: */
gl_Position = ftransform();
/* Pass through texture coordinates: */
gl_TexCoord[0] = gl_MultiTexCoord0;
/* Contrast value is stored in auxParameters0[0]: */
float Contrast = auxParameters0[0];
/* Pass through random seed value from auxParameters0[1]: */
seed = auxParameters0[1];
/* Pass through reciprocal of size of the texture width x height = xy */
texSize = 1.0 / sizeAngleFilterMode.xy;
/* Premultiply the wanted Contrast to the color: */
baseColor = modulateColor * Contrast;
}
|