Skip to content

riccardoscalco/glsl-rectangular-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glsl-rectangular-function

Glsl implementation of the rectangular function.

Install

npm install glsl-rectangular-function

Usage

#pragma glslify: rectangularFunction = require(glsl-rectangular-function)

void main() {
	vec2 p = gl_FragCoord.xy / resolution.xy;

	float center = 0.5;
	float width = 0.25;
	float y = rectangularFunction(p.x, center, width);

	gl_FragColor = vec4(vec3(y), 1.0);
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy