Byte Engine
  • welcome
  • Design
    • Rendering
      • material_assets
      • Render Models
        • Visibility
    • Resource Management
      • assets
  • Testing
  • References
    • Byte Engine Shader Language
    • JSON Shader Program Description
  • Sample Project
    • Creating Components
    • input
    • Project Setup
  • Setup
    • Environment Setup
    • installation
Powered by GitBook
On this page
  • Introduction
  • Code Samples
  • Struct declaration
  • Function declaration
  • Variable declaration
  1. References

Byte Engine Shader Language

Introduction

BESL is an innovative programming language designed to facilitate the creation of shaders within game engines. Drawing inspiration from the Rust programming language, BESL combines safety, performance, and expressiveness to elevate the art of shader development. This document outlines the key features, syntax, and concepts of BESL for developers seeking a powerful toolset for crafting high-performance graphics in game environments.

BESL features a modern syntax to make shader programming more ergonomic.

Currently, BESL can only compile down to GLSL.

Code Samples

Struct declaration

Light: struct {
	position: vec3f,
	color: vec3f,
	intensity: f32
}

Function declaration

mod_by_16: fn (x: i32) -> i32 {
	return x % 16
}

Variable declaration

x: i32 = 5
PreviousReferencesNextJSON Shader Program Description

Last updated 10 months ago