A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/de/docs/Web/API/WebGLRenderingContext/getShaderPrecisionFormat below:

WebGLRenderingContext: Methode getShaderPrecisionFormat() - Web-APIs

WebGLRenderingContext: Methode getShaderPrecisionFormat()

Baseline Widely available

Hinweis: Diese Funktion ist in Web Workers verfügbar.

Die Methode WebGLRenderingContext.getShaderPrecisionFormat() der WebGL API gibt ein neues WebGLShaderPrecisionFormat-Objekt zurück, das den Bereich und die Präzision für das angegebene numerische Format des Shaders beschreibt.

Syntax
getShaderPrecisionFormat(shaderType, precisionType)
Parameter
shaderType

Entweder ein gl.FRAGMENT_SHADER oder ein gl.VERTEX_SHADER.

precisionType

Ein Präzisionstyp-Wert. Entweder gl.LOW_FLOAT, gl.MEDIUM_FLOAT, gl.HIGH_FLOAT, gl.LOW_INT, gl.MEDIUM_INT oder gl.HIGH_INT.

Rückgabewert

Ein WebGLShaderPrecisionFormat-Objekt oder null, falls ein Fehler auftritt.

Ausnahmen Beispiele

Der folgende Code ermittelt das Präzisionsformat eines gl.VERTEX_SHADER mit einem gl.MEDIUM_FLOAT-Präzisionstyp.

const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");

gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT);
// WebGLShaderPrecisionFormat { rangeMin: 127, rangeMax: 127, precision: 23 }
Spezifikationen Browser-Kompatibilität Siehe auch MDN-Feedback-Box War diese Übersetzung hilfreich?

Diese Seite wurde automatisch aus dem Englischen übersetzt.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4