Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In order to run, Stride games require a user to have the following installed:
* OpenAL (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#openal))
* SDL2 (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#sdl2))
* FreeImage (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#freeimage))
* Vulkan or OpenGL (depending on the graphics API used by your game)
* Vulkan

> [!NOTE]
> This page doesn't contain information for all platforms. If you want to expand it, consider [contributing to the documentation](../../../contributors/documentation/index.md).
Expand Down
6 changes: 3 additions & 3 deletions en/manual/get-started/create-a-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ To create an empty project:

**Graphics API:** The graphics features you can use in your project depend on the API you select. For advanced graphics features, select the latest version of the graphics APIs.

>[!WARNING]
>Some graphics cards don't support the latest APIs. For some mobile devices, only Direct3D 9.3 / OpenGL ES 2.0 and Direct3D 10.0 / OpenGL ES 3.0 are available.
> [!WARNING]
> Some graphics cards don't support the latest APIs.

**High or Low Dynamic Range (HDR / LDR):** This defines how color is computed in your project. In LDR mode, colors range from 0 to 1. In HDR mode colors can take any float value. HDR provides more advanced and realistic rendering but requires more processing power and profile Direct3D 10.0 / OpenGL ES 3.0 or later.
**High or Low Dynamic Range (HDR / LDR):** This defines how color is computed in your project. In LDR mode, colors range from 0 to 1. In HDR mode colors can take any float value. HDR provides more advanced and realistic rendering but requires more processing power and profile Level 10.0 or later.

9. Under **Orientation**, choose the orientation for your project. For PC games, use landscape. Portrait should usually only be used for mobile games.

Expand Down
2 changes: 0 additions & 2 deletions en/manual/graphics/effects-and-shaders/compile-shaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ Stride converts Stride shaders (`sdsl` and `.sdfx` files) into the shader langua
| Platform | Shader language |
|----------|-----------------|
| Direct3D | HLSL |
| OpenGL | GLSL |
| Vulkan | SPIR-V |
| iOS | OpenGL ES |

Stride can convert the shaders at runtime (when the game is running) or at build time (when the editor builds the game assets). When Stride generates shaders at runtime, rendering stops until the shader is compiled. This is usually something you want to avoid in your release build — especially on mobile platforms, which have less CPU, so the pause can be more noticable.

Expand Down
5 changes: 1 addition & 4 deletions en/manual/graphics/effects-and-shaders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ As some platforms can't compile shaders at runtime (eg iOS, Android, etc), effec

## Target everything

Stride shaders are converted automatically to the target graphics platform — either plain HLSL for Direct3D, `GLSL` for OpenGL, or `SPIR-V` for Vulkan platforms.
Stride shaders are converted automatically to the target graphics platform — either plain HLSL for Direct3D or `SPIR-V` for Vulkan platforms.

For mobile platforms, shaders are optimized by a GLSL optimizer to improve performance.

> [!NOTE]
> Converting to OpenGL Compute shaders are not supported in SDSL yet.

## In this section

* [Effect language](effect-language.md)
Expand Down
2 changes: 1 addition & 1 deletion en/manual/graphics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Shaders are authored in the [Stride's shading language](effects-and-shaders/shad

## Target everything

Stride shaders are converted automatically to the target graphics platform, either plain HLSL for Direct3D, `GLSL` for OpenGL, or `SPIR-V` for Vulkan platforms.
Stride shaders are converted automatically to the target graphics platform, either plain HLSL for Direct3D or `SPIR-V` for Vulkan platforms.

## Advanced graphics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


### Prerequesites:
VoxelGI requires Graphics Profile Level 11 or Higher (Direct3D 11.0 / OpenGL ES 3.1). This can be set in the Game Settings asset under the Rendering category.
VoxelGI requires Graphics Profile Level 11 or Higher. This can be set in the Game Settings asset under the Rendering category.

Since Stride is modular, we need to add a reference to the `Stride.Voxels` plugin:

Expand Down
2 changes: 1 addition & 1 deletion en/manual/install-and-update/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To develop for mobile platforms, you also need:
To run games made with Stride, you need:

- .NET 10 if your application is not [self-contained](https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained)
- DirectX11 (included with Windows 10 and later), OpenGL, or Vulkan depending on the platform, and the graphics API override set in your `.csproj`
- DirectX11 (included with Windows 10 and later) or Vulkan depending on the platform, and the graphics API override set in your `.csproj`
- Visual C++ 2015 runtimes (x86 and/or x64, depending on what you set in your project properties in Visual Studio)

## Supported platforms
Expand Down
42 changes: 24 additions & 18 deletions en/manual/scripts/preprocessor-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,38 @@ If you're developing for multiple platforms, you often need to write custom code

## Platforms

| Variable | Value |
| -------------------------------------- | ------------------------------ |
| STRIDE_PLATFORM_WINDOWS | Windows (standard and RT) |
| STRIDE_PLATFORM_WINDOWS_DESKTOP | Windows (non-RT) |
| STRIDE_PLATFORM_MONO_MOBILE | Xamarin.iOS or Xamarin.Android |
| STRIDE_PLATFORM_ANDROID | Xamarin.Android |
| STRIDE_PLATFORM_IOS | Xamarin.iOS |
| Variable | Platform |
| :-- | :-- |
| STRIDE_PLATFORM_DESKTOP | Any desktop platform (Windows, Linux or Macos) |
| STRIDE_PLATFORM_MONO_MOBILE | Any mobile platform (Android or iOS) |
| STRIDE_PLATFORM_ANDROID | Android |
| STRIDE_PLATFORM_IOS | iOS |

Additionally, msbuild provides these variables:

| Variable | Platform |
| :-- | :-- |
| WINDOWS | Windows |
| MACOS | MacOS |

## Graphics APIs

| Variable | Value |
| --------------------------------------------- | --------------------- |
| STRIDE_GRAPHICS_API_DIRECT3D | Direct3D 11 |
| STRIDE_GRAPHICS_API_OPENGL | OpenGL (Core and ES) |
| STRIDE_GRAPHICS_API_OPENGLCORE | OpenGL Core (Desktop) |
| STRIDE_GRAPHICS_API_OPENGLES | OpenGL ES |
| STRIDE_GRAPHICS_API_VULKAN | Vulkan |
| Variable | Graphics API |
| :-- | :-- |
| STRIDE_GRAPHICS_API_DIRECT3D | Direct3D 11 or 12 |
| STRIDE_GRAPHICS_API_DIRECT3D11 | Direct3D 11 |
| STRIDE_GRAPHICS_API_DIRECT3D12 | Direct3D 12 |
| STRIDE_GRAPHICS_API_VULKAN | Vulkan |
| STRIDE_GRAPHICS_API_NULL | Null |

## Example

```cs
#if STRIDE_PLATFORM_WINDOWS
// Windows-specific code goes here...
#if STRIDE_PLATFORM_DESKTOP
// Desktop-specific code goes here...

#elif STRIDE_PLATFORM_MONO_MOBILE
// iOS and Android-specific code goes here...
#elif STRIDE_PLATFORM_ANDROID
// Android-specific code goes here...

#else
// Other platform code goes here...
Expand Down
2 changes: 1 addition & 1 deletion en/manual/troubleshooting/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ If you select **GPU** as the display mode, the profiler displays:
![GPU profiling](media/fps-gpu.png)

* `Device`: the graphics device (manufacturer's description)
* `Platform`: the currently used backend (eg DirectX, OpenGL, Vulkan, etc)
* `Platform`: the currently used backend (DirectX or Vulkan)
* `Profile`: the feature level for your game, set in **Game Settings > Rendering** (see [Game settings](../game-studio/game-settings.md))
* `Resolution`: the game resolution
* `Drawn triangles`: the number of triangles drawn per frame
Expand Down