Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.
/ parcel-plugin-glsl Public archive

A parcel plugin for GLSL files

Notifications You must be signed in to change notification settings

seep/parcel-plugin-glsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-plugin-glsl

Import .glsl files as strings with parcel. The shader contents are available as the default export of the file.

Example

import { ShaderMaterial } from 'three';
import vertexShader from './vert-shader.glsl';
import fragmentShader from './frag-shader.glsl';

export function CustomShaderMaterial() {
  
  return new ShaderMaterial({
    uniforms: { ... },
    vertexShader,
    fragmentShader,
  });
  
}

About

A parcel plugin for GLSL files

Topics

Resources

Stars

Watchers

Forks