Skip to content

Commit fcf83db

Browse files
Initial import of code.
1 parent 52e8d4b commit fcf83db

File tree

501 files changed

+91369
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

501 files changed

+91369
-3
lines changed

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
*.exe
2+
*.pdb
3+
.vs
4+
*.VC.opendb
5+
*.VC.db
6+
*.vcxproj.user
7+
*.sdf
8+
bin/
9+
intermediate/
10+
11+
# files generated by test runner
12+
*.actual
13+
*.hlsl.expected
14+
*.fx.expected
15+
*.glsl.expected
16+
*.vert.expected
17+
*.frag.expected
18+
*.geom.expected
19+
*.tesc.expected
20+
*.tese.expected
21+
*.comp.expected
22+
*.expected.png
23+
*.actual.png
24+
25+
# files generated by other shader compilers
26+
*.spv

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 shader-slang
3+
Copyright (c) 2016, Carnegie Mellon University and NVIDIA Corporation
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
1-
# slang
2-
Making it easier to work with shaders
1+
# Slang
2+
3+
Slang is a library for compiling real-time shader code.
4+
It can be used with either existing HLSL or GLSL code, or with code written directly in Slang.
5+
The library provides a variety of services that application developers can use to put together the shader compilation workflow they want.
6+
7+
Services provided by the Slang library include:
8+
9+
* Slang can scan ordinary HLSL or GLSL code that neglects to include `register` or `layout` bindings and "rewrite" that code to include explicit bindings for all shader parameters. This lets you write simple and clean code, but still get deterministic binding locations.
10+
11+
* Slang provides a full reflection API for shader parameters, with a uniform interface across HLSL, GLSL, and Slang. The reflection system does not silently drop unused/"dead" parameters, and it can even be used on libraries of shader code without compiling any entry points.
12+
13+
* *Work in progress:* Slang supports cross-compilation of either HLSL or Slang code to GLSL.
14+
15+
* You can directly get HLSL or GLSL source code as output from Slang, or you can let the library invoke lower-level code generation for you to get back DXBC or SPIR-V (DXIL support to come).
16+
17+
## Documentation
18+
19+
TODO
20+
21+
## Getting Started
22+
23+
TODO
24+
25+
## Testing
26+
27+
TODO
28+
29+
## Contributing
30+
31+
TODO
32+
33+
## Contributors
34+
35+
* Yong He
36+
* Haomin Long
37+
* Teguh Hofstee
38+
* Tim Foley

build/slang-build.props

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ImportGroup Label="PropertySheets" />
4+
<PropertyGroup Label="UserMacros" />
5+
<PropertyGroup>
6+
<OutDir>$(SolutionDir)bin\$(PlatformShortName)\$(Configuration)\</OutDir>
7+
<IntDir>$(SolutionDir)intermediate\$(PlatformShortName)\$(Configuration)\$(ProjectName)\</IntDir>
8+
</PropertyGroup>
9+
<ItemDefinitionGroup />
10+
<ItemGroup />
11+
</Project>

examples/hello/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Spire "Hello World" Example
2+
===========================
3+
4+
The goal of this example is to demonstrate an almost minimal application that uses Spire for shading, and D3D11 for rendering.
5+
6+
The `hello.spire` file contains a simple declaration of a Spire *shader module*, along with a *pipeline declaration* that will be used for mapping shader code to the capabilities of the "engine" (in this case, just vertex and fragment shaders).
7+
The `hello.cpp` file contains the C++ application code, showing how to use the Spire C API to load and compile the shader code, and construct a (trivial) executable shader from Spire modules.
8+
9+
Note that this example is not intended to demonstrate good practices for integrating Spire into a production engine; the goal is merely to use the minimum amount of code possible to demonstrate a complete applicaiton that uses Spire.

0 commit comments

Comments
 (0)