|
|
4 ay önce | |
|---|---|---|
| .. | ||
| .config | 4 ay önce | |
| .vscode | 4 ay önce | |
| Core | 4 ay önce | |
| Platforms | 4 ay önce | |
| LensFlare.sln | 4 ay önce | |
| README.md | 4 ay önce | |
This is a MonoGame 3.8.4 sample that demonstrates how to implement a lens flare effect using occlusion queries to hide the flares when the sun is hidden behind the landscape.
LensFlare.sln in Visual StudioUse Ctrl+Shift+P and run tasks:
Tasks: Run Task → build-windowsTasks: Run Task → build-desktopglTasks: Run Task → build-androidTasks: Run Task → run-windowsTasks: Run Task → run-desktopglFor debugging, use F5 or Ctrl+F5 to launch the configured debug sessions
dotnet build LensFlare.Windows.csproj
dotnet run --project LensFlare.Windows.csproj
dotnet build LensFlare.DesktopGL.csproj
dotnet run --project LensFlare.DesktopGL.csproj
dotnet build LensFlare.Android.csproj
# Deploy to connected Android device/emulator:
dotnet publish LensFlare.Android.csproj -f net8.0-android
dotnet build LensFlare.iOS.csproj
# Deploy requires Xcode and connected iOS device or simulator
LensFlare/
├── Core/ # Shared game logic and components
│ ├── Game.cs # Main game class
│ ├── LensFlareComponent.cs # Lens flare effect implementation
│ └── Content/ # Shared content (textures, models)
├── Platforms/ # Platform-specific code
│ ├── Windows/ # Windows-specific entry point
│ ├── DesktopGL/ # DesktopGL-specific entry point
│ ├── Android/ # Android-specific code and manifest
│ └── iOS/ # iOS-specific code
├── bin/ # Build output
├── obj/ # Build intermediates
├── *.csproj # Project files
└── LensFlare.sln # Visual Studio solution file
This sample demonstrates:
This sample is based on the original Microsoft XNA Community Game Platform samples and has been updated for MonoGame 3.8.4.
Feel free to contribute improvements, bug fixes, or platform-specific optimizations through pull requests.