CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-gl

Creates a WebGL context without a window for headless rendering and server-side graphics

Overall
score

96%

Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This criteria evaluates the engineer's proficiency in using the gl (headless-gl) package for texture unit selection and multi-texture rendering. It focuses specifically on the proper use of activeTexture() to bind multiple textures to different texture units and sample them in shaders.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Context Creation",
      "description": "Uses createContext() to create a WebGL rendering context with the correct dimensions (512x512)",
      "max_score": 10
    },
    {
      "name": "Texture Creation",
      "description": "Uses createTexture() to create three separate texture objects",
      "max_score": 10
    },
    {
      "name": "Texture Binding",
      "description": "Uses bindTexture() with gl.TEXTURE_2D to bind each texture before configuration and data upload",
      "max_score": 10
    },
    {
      "name": "activeTexture Usage",
      "description": "Uses activeTexture() to select different texture units (e.g., gl.TEXTURE0, gl.TEXTURE1, gl.TEXTURE2) before binding textures",
      "max_score": 25
    },
    {
      "name": "Texture Data Upload",
      "description": "Uses texImage2D() to upload texture data for all three textures with appropriate parameters (target, level, internalformat, width, height, border, format, type, pixels)",
      "max_score": 10
    },
    {
      "name": "Texture Parameters",
      "description": "Uses texParameteri() to set appropriate texture filtering (MIN_FILTER, MAG_FILTER) and wrapping modes (WRAP_S, WRAP_T)",
      "max_score": 10
    },
    {
      "name": "Shader Uniforms",
      "description": "Uses getUniformLocation() to get uniform locations for the texture samplers and uniform1i() to bind the correct texture units to the shader samplers",
      "max_score": 15
    },
    {
      "name": "Framebuffer Reading",
      "description": "Uses readPixels() to extract rendered pixel data from the framebuffer with correct parameters (x, y, width, height, format, type, buffer)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-gl

tile.json