Other

Moja wizja ścieżki rozwoju i nauki kogoś, kto chce się zająć programowaniem gier przedstawiona w formie graficznej jako drzewko umiejętności, jak w grach RPG :) Plus spis literatury i innych źródeł, z których najlepiej uczyć się poszczególnych dziedzin.

Date: 2007-06-10

HLSL Syntax Highlighting for jEdit

Syntax highlighting rules (Edit Mode) of HLSL - DirectX shader language - for jEdit. Supports up to DirectX 11 (Shader Model 5).

To install it: Download the "hlsl.xml" file. Place it in your jEdit's "modes" subdirectory, e.g.: "C:\Program Files (x86)\jEdit 4.3.1\modes" and replace the existing one. That's all. You can double-click on the right part of the status bar in jEdit to open the Buffer Options window and select Edit mode = "hlsl".

But it's better to associate this coloring scheme with some file extensions. To do that, open file: "C:\Program Files (x86)\jEdit 4.3.1\modes\catalog", comment out the "javafx" mode as it owns the "fx" file extension by defalt:

<!--<MODE NAME="javafx"    FILE="javafx.xml"
        FILE_NAME_GLOB="*.fx" />-->

Then find and alter the entry about "hlsl" mode to associate it with whatever file extension you use for your shaders, like the example:

<MODE NAME="hlsl"    FILE="hlsl.xml"
        FILE_NAME_GLOB="*.{fx,hlsl}" />

If you edit this file inside jEdit, you don't even have to restart it - new rules are applied automatically.

You may ask why not just use the C++ coloring scheme for shader code? Of course you can do it, the syntax is similar because all the tokens, like strings, numbers and identifiers look the same way. But my coloring schemes give separate colors for language elements such as: semantics (like c:COLOR0), component indexing (like v.xyzz), atomic types (like float), object types (like Texture2D or RWStructuredBuffer) and intrinsic functions (like sin, cos, InterlockedCompareExchange).

Date: 2010-04-30

Download:
hlsl.xml

STAT NO AD
[Stat] [STAT NO AD] [Download] [Dropbox] [pub] [Mirror]
Copyright © 2004-2017