├── README.md └── materials ├── Actor ├── Actor.ESSL_310.Fragment.glsl ├── Actor.ESSL_310.Fragment.sc ├── Actor.ESSL_310.Vertex.glsl ├── Actor.ESSL_310.Vertex.sc └── Actor.varying.def.sc ├── ActorBanner ├── ActorBanner.ESSL_310.Fragment.glsl ├── ActorBanner.ESSL_310.Fragment.sc ├── ActorBanner.ESSL_310.Vertex.glsl ├── ActorBanner.ESSL_310.Vertex.sc └── ActorBanner.varying.def.sc ├── ActorBannerForwardPBR ├── ActorBannerForwardPBR.ESSL_310.Fragment.glsl ├── ActorBannerForwardPBR.ESSL_310.Fragment.sc ├── ActorBannerForwardPBR.ESSL_310.Vertex.glsl ├── ActorBannerForwardPBR.ESSL_310.Vertex.sc └── ActorBannerForwardPBR.varying.def.sc ├── ActorBannerPrepass ├── ActorBannerPrepass.ESSL_310.Fragment.glsl ├── ActorBannerPrepass.ESSL_310.Fragment.sc ├── ActorBannerPrepass.ESSL_310.Vertex.glsl ├── ActorBannerPrepass.ESSL_310.Vertex.sc └── ActorBannerPrepass.varying.def.sc ├── ActorBase ├── ActorBase.ESSL_310.Fragment.glsl ├── ActorBase.ESSL_310.Fragment.sc ├── ActorBase.ESSL_310.Vertex.glsl ├── ActorBase.ESSL_310.Vertex.sc └── ActorBase.varying.def.sc ├── ActorForwardPBR ├── ActorForwardPBR.ESSL_310.Fragment.glsl ├── ActorForwardPBR.ESSL_310.Fragment.sc ├── ActorForwardPBR.ESSL_310.Vertex.glsl ├── ActorForwardPBR.ESSL_310.Vertex.sc └── ActorForwardPBR.varying.def.sc ├── ActorGlint ├── ActorGlint.ESSL_310.Fragment.glsl ├── ActorGlint.ESSL_310.Fragment.sc ├── ActorGlint.ESSL_310.Vertex.glsl ├── ActorGlint.ESSL_310.Vertex.sc └── ActorGlint.varying.def.sc ├── ActorGlintForwardPBR ├── ActorGlintForwardPBR.ESSL_310.Fragment.glsl ├── ActorGlintForwardPBR.ESSL_310.Fragment.sc ├── ActorGlintForwardPBR.ESSL_310.Vertex.glsl ├── ActorGlintForwardPBR.ESSL_310.Vertex.sc └── ActorGlintForwardPBR.varying.def.sc ├── ActorGlintPrepass ├── ActorGlintPrepass.ESSL_310.Fragment.glsl ├── ActorGlintPrepass.ESSL_310.Fragment.sc ├── ActorGlintPrepass.ESSL_310.Vertex.glsl ├── ActorGlintPrepass.ESSL_310.Vertex.sc └── ActorGlintPrepass.varying.def.sc ├── ActorMultiTexture ├── ActorMultiTexture.ESSL_310.Fragment.glsl ├── ActorMultiTexture.ESSL_310.Fragment.sc ├── ActorMultiTexture.ESSL_310.Vertex.glsl ├── ActorMultiTexture.ESSL_310.Vertex.sc └── ActorMultiTexture.varying.def.sc ├── ActorMultiTextureForwardPBR ├── ActorMultiTextureForwardPBR.ESSL_310.Fragment.glsl ├── ActorMultiTextureForwardPBR.ESSL_310.Fragment.sc ├── ActorMultiTextureForwardPBR.ESSL_310.Vertex.glsl ├── ActorMultiTextureForwardPBR.ESSL_310.Vertex.sc └── ActorMultiTextureForwardPBR.varying.def.sc ├── ActorMultiTexturePrepass ├── ActorMultiTexturePrepass.ESSL_310.Fragment.glsl ├── ActorMultiTexturePrepass.ESSL_310.Fragment.sc ├── ActorMultiTexturePrepass.ESSL_310.Vertex.glsl ├── ActorMultiTexturePrepass.ESSL_310.Vertex.sc └── ActorMultiTexturePrepass.varying.def.sc ├── ActorPattern ├── ActorPattern.ESSL_310.Fragment.glsl ├── ActorPattern.ESSL_310.Fragment.sc ├── ActorPattern.ESSL_310.Vertex.glsl ├── ActorPattern.ESSL_310.Vertex.sc └── ActorPattern.varying.def.sc ├── ActorPatternForwardPBR ├── ActorPatternForwardPBR.ESSL_310.Fragment.glsl ├── ActorPatternForwardPBR.ESSL_310.Fragment.sc ├── ActorPatternForwardPBR.ESSL_310.Vertex.glsl ├── ActorPatternForwardPBR.ESSL_310.Vertex.sc └── ActorPatternForwardPBR.varying.def.sc ├── ActorPatternGlint ├── ActorPatternGlint.ESSL_310.Fragment.glsl ├── ActorPatternGlint.ESSL_310.Fragment.sc ├── ActorPatternGlint.ESSL_310.Vertex.glsl ├── ActorPatternGlint.ESSL_310.Vertex.sc └── ActorPatternGlint.varying.def.sc ├── ActorPatternPrepass ├── ActorPatternPrepass.ESSL_310.Fragment.glsl ├── ActorPatternPrepass.ESSL_310.Fragment.sc ├── ActorPatternPrepass.ESSL_310.Vertex.glsl ├── ActorPatternPrepass.ESSL_310.Vertex.sc └── ActorPatternPrepass.varying.def.sc ├── ActorPrepass ├── ActorPrepass.ESSL_310.Fragment.glsl ├── ActorPrepass.ESSL_310.Fragment.sc ├── ActorPrepass.ESSL_310.Vertex.glsl ├── ActorPrepass.ESSL_310.Vertex.sc └── ActorPrepass.varying.def.sc ├── ActorTint ├── ActorTint.ESSL_310.Fragment.glsl ├── ActorTint.ESSL_310.Fragment.sc ├── ActorTint.ESSL_310.Vertex.glsl ├── ActorTint.ESSL_310.Vertex.sc └── ActorTint.varying.def.sc ├── ActorTintForwardPBR ├── ActorTintForwardPBR.ESSL_310.Fragment.glsl ├── ActorTintForwardPBR.ESSL_310.Fragment.sc ├── ActorTintForwardPBR.ESSL_310.Vertex.glsl ├── ActorTintForwardPBR.ESSL_310.Vertex.sc └── ActorTintForwardPBR.varying.def.sc ├── ActorTintPrepass ├── ActorTintPrepass.ESSL_310.Fragment.glsl ├── ActorTintPrepass.ESSL_310.Fragment.sc ├── ActorTintPrepass.ESSL_310.Vertex.glsl ├── ActorTintPrepass.ESSL_310.Vertex.sc └── ActorTintPrepass.varying.def.sc ├── Basic ├── Basic.ESSL_310.Fragment.glsl ├── Basic.ESSL_310.Fragment.sc ├── Basic.ESSL_310.Vertex.glsl ├── Basic.ESSL_310.Vertex.sc └── Basic.varying.def.sc ├── BeaconBeam ├── BeaconBeam.ESSL_310.Fragment.glsl ├── BeaconBeam.ESSL_310.Fragment.sc ├── BeaconBeam.ESSL_310.Vertex.glsl ├── BeaconBeam.ESSL_310.Vertex.sc └── BeaconBeam.varying.def.sc ├── Blit ├── Blit.ESSL_310.Fragment.glsl ├── Blit.ESSL_310.Fragment.sc ├── Blit.ESSL_310.Vertex.glsl ├── Blit.ESSL_310.Vertex.sc └── Blit.varying.def.sc ├── BlitColor ├── BlitColor.ESSL_310.Fragment.glsl ├── BlitColor.ESSL_310.Fragment.sc ├── BlitColor.ESSL_310.Vertex.glsl ├── BlitColor.ESSL_310.Vertex.sc └── BlitColor.varying.def.sc ├── BlockOutlineSelection ├── BlockOutlineSelection.ESSL_310.Fragment.glsl ├── BlockOutlineSelection.ESSL_310.Fragment.sc ├── BlockOutlineSelection.ESSL_310.Vertex.glsl ├── BlockOutlineSelection.ESSL_310.Vertex.sc └── BlockOutlineSelection.varying.def.sc ├── BlockSelectionOutline ├── BlockSelectionOutline.ESSL_310.Fragment.glsl ├── BlockSelectionOutline.ESSL_310.Fragment.sc ├── BlockSelectionOutline.ESSL_310.Vertex.glsl ├── BlockSelectionOutline.ESSL_310.Vertex.sc └── BlockSelectionOutline.varying.def.sc ├── BlockSelectionOverlay ├── BlockSelectionOverlay.ESSL_310.Fragment.glsl ├── BlockSelectionOverlay.ESSL_310.Fragment.sc ├── BlockSelectionOverlay.ESSL_310.Vertex.glsl ├── BlockSelectionOverlay.ESSL_310.Vertex.sc └── BlockSelectionOverlay.varying.def.sc ├── BlockSelectionOverlayBlockEntity ├── BlockSelectionOverlayBlockEntity.ESSL_310.Fragment.glsl ├── BlockSelectionOverlayBlockEntity.ESSL_310.Fragment.sc ├── BlockSelectionOverlayBlockEntity.ESSL_310.Vertex.glsl ├── BlockSelectionOverlayBlockEntity.ESSL_310.Vertex.sc └── BlockSelectionOverlayBlockEntity.varying.def.sc ├── Bloom ├── Bloom.ESSL_310.Fragment.glsl ├── Bloom.ESSL_310.Fragment.sc ├── Bloom.ESSL_310.Vertex.glsl ├── Bloom.ESSL_310.Vertex.sc └── Bloom.varying.def.sc ├── Builtins ├── Builtins.ESSL_310.Fragment.glsl ├── Builtins.ESSL_310.Fragment.sc ├── Builtins.ESSL_310.Vertex.glsl ├── Builtins.ESSL_310.Vertex.sc └── Builtins.varying.def.sc ├── CameraAimAssistHighlight ├── CameraAimAssistHighlight.ESSL_310.Fragment.glsl ├── CameraAimAssistHighlight.ESSL_310.Fragment.sc ├── CameraAimAssistHighlight.ESSL_310.Vertex.glsl ├── CameraAimAssistHighlight.ESSL_310.Vertex.sc └── CameraAimAssistHighlight.varying.def.sc ├── Checkerboarding ├── Checkerboarding.ESSL_310.Compute.glsl ├── Checkerboarding.ESSL_310.Compute.sc ├── Checkerboarding.ESSL_310.Fragment.glsl ├── Checkerboarding.ESSL_310.Fragment.sc ├── Checkerboarding.ESSL_310.Vertex.glsl └── Checkerboarding.ESSL_310.Vertex.sc ├── ClearVolume ├── ClearVolume.ESSL_310.Compute.glsl ├── ClearVolume.ESSL_310.Compute.sc ├── ClearVolume.ESSL_310.Fragment.glsl ├── ClearVolume.ESSL_310.Fragment.sc ├── ClearVolume.ESSL_310.Vertex.glsl └── ClearVolume.ESSL_310.Vertex.sc ├── Clouds ├── Clouds.ESSL_310.Fragment.glsl ├── Clouds.ESSL_310.Fragment.sc ├── Clouds.ESSL_310.Vertex.glsl ├── Clouds.ESSL_310.Vertex.sc └── Clouds.varying.def.sc ├── CloudsForwardPBR ├── CloudsForwardPBR.ESSL_310.Fragment.glsl ├── CloudsForwardPBR.ESSL_310.Fragment.sc ├── CloudsForwardPBR.ESSL_310.Vertex.glsl ├── CloudsForwardPBR.ESSL_310.Vertex.sc └── CloudsForwardPBR.varying.def.sc ├── Color ├── Color.ESSL_310.Fragment.glsl ├── Color.ESSL_310.Fragment.sc ├── Color.ESSL_310.Vertex.glsl ├── Color.ESSL_310.Vertex.sc └── Color.varying.def.sc ├── ColorPostProcessing ├── ColorPostProcessing.ESSL_310.Fragment.glsl ├── ColorPostProcessing.ESSL_310.Fragment.sc ├── ColorPostProcessing.ESSL_310.Vertex.glsl ├── ColorPostProcessing.ESSL_310.Vertex.sc └── ColorPostProcessing.varying.def.sc ├── Cracks ├── Cracks.ESSL_310.Fragment.glsl ├── Cracks.ESSL_310.Fragment.sc ├── Cracks.ESSL_310.Vertex.glsl ├── Cracks.ESSL_310.Vertex.sc └── Cracks.varying.def.sc ├── CracksBlockEntity ├── CracksBlockEntity.ESSL_310.Fragment.glsl ├── CracksBlockEntity.ESSL_310.Fragment.sc ├── CracksBlockEntity.ESSL_310.Vertex.glsl ├── CracksBlockEntity.ESSL_310.Vertex.sc └── CracksBlockEntity.varying.def.sc ├── Cubemap ├── Cubemap.ESSL_310.Fragment.glsl ├── Cubemap.ESSL_310.Fragment.sc ├── Cubemap.ESSL_310.Vertex.glsl ├── Cubemap.ESSL_310.Vertex.sc └── Cubemap.varying.def.sc ├── CubemapHDRi ├── CubemapHDRi.ESSL_310.Fragment.glsl ├── CubemapHDRi.ESSL_310.Fragment.sc ├── CubemapHDRi.ESSL_310.Vertex.glsl ├── CubemapHDRi.ESSL_310.Vertex.sc └── CubemapHDRi.varying.def.sc ├── CubemapTransfer ├── CubemapTransfer.ESSL_310.Fragment.glsl ├── CubemapTransfer.ESSL_310.Fragment.sc ├── CubemapTransfer.ESSL_310.Vertex.glsl ├── CubemapTransfer.ESSL_310.Vertex.sc └── CubemapTransfer.varying.def.sc ├── DeferredShading ├── DeferredShading.ESSL_310.Fragment.glsl ├── DeferredShading.ESSL_310.Fragment.sc ├── DeferredShading.ESSL_310.Vertex.glsl ├── DeferredShading.ESSL_310.Vertex.sc └── DeferredShading.varying.def.sc ├── EditorBlockVolumeHull ├── EditorBlockVolumeHull.ESSL_310.Fragment.glsl ├── EditorBlockVolumeHull.ESSL_310.Fragment.sc ├── EditorBlockVolumeHull.ESSL_310.Vertex.glsl ├── EditorBlockVolumeHull.ESSL_310.Vertex.sc └── EditorBlockVolumeHull.varying.def.sc ├── EditorBlockVolumeWireframe ├── EditorBlockVolumeWireframe.ESSL_310.Fragment.glsl ├── EditorBlockVolumeWireframe.ESSL_310.Fragment.sc ├── EditorBlockVolumeWireframe.ESSL_310.Vertex.glsl ├── EditorBlockVolumeWireframe.ESSL_310.Vertex.sc └── EditorBlockVolumeWireframe.varying.def.sc ├── EditorHighlight ├── EditorHighlight.ESSL_310.Fragment.glsl ├── EditorHighlight.ESSL_310.Fragment.sc ├── EditorHighlight.ESSL_310.Vertex.glsl ├── EditorHighlight.ESSL_310.Vertex.sc └── EditorHighlight.varying.def.sc ├── EditorSelectionCursor ├── EditorSelectionCursor.ESSL_310.Fragment.glsl ├── EditorSelectionCursor.ESSL_310.Fragment.sc ├── EditorSelectionCursor.ESSL_310.Vertex.glsl ├── EditorSelectionCursor.ESSL_310.Vertex.sc └── EditorSelectionCursor.varying.def.sc ├── EndPortal ├── EndPortal.ESSL_310.Fragment.glsl ├── EndPortal.ESSL_310.Fragment.sc ├── EndPortal.ESSL_310.Vertex.glsl ├── EndPortal.ESSL_310.Vertex.sc └── EndPortal.varying.def.sc ├── EndPortalForwardPBR ├── EndPortalForwardPBR.ESSL_310.Fragment.glsl ├── EndPortalForwardPBR.ESSL_310.Fragment.sc ├── EndPortalForwardPBR.ESSL_310.Vertex.glsl ├── EndPortalForwardPBR.ESSL_310.Vertex.sc └── EndPortalForwardPBR.varying.def.sc ├── EndSky ├── EndSky.ESSL_310.Fragment.glsl ├── EndSky.ESSL_310.Fragment.sc ├── EndSky.ESSL_310.Vertex.glsl ├── EndSky.ESSL_310.Vertex.sc └── EndSky.varying.def.sc ├── Entity ├── Entity.ESSL_310.Fragment.glsl ├── Entity.ESSL_310.Fragment.sc ├── Entity.ESSL_310.Vertex.glsl ├── Entity.ESSL_310.Vertex.sc └── Entity.varying.def.sc ├── FlameBillboard ├── FlameBillboard.ESSL_310.Fragment.glsl ├── FlameBillboard.ESSL_310.Fragment.sc ├── FlameBillboard.ESSL_310.Vertex.glsl ├── FlameBillboard.ESSL_310.Vertex.sc └── FlameBillboard.varying.def.sc ├── Flipbook ├── Flipbook.ESSL_310.Fragment.glsl ├── Flipbook.ESSL_310.Fragment.sc ├── Flipbook.ESSL_310.Vertex.glsl ├── Flipbook.ESSL_310.Vertex.sc └── Flipbook.varying.def.sc ├── FloatingPointClear ├── FloatingPointClear.ESSL_310.Fragment.glsl ├── FloatingPointClear.ESSL_310.Fragment.sc ├── FloatingPointClear.ESSL_310.Vertex.glsl ├── FloatingPointClear.ESSL_310.Vertex.sc └── FloatingPointClear.varying.def.sc ├── GPUDebugUtils ├── GPUDebugUtils.ESSL_310.Compute.glsl ├── GPUDebugUtils.ESSL_310.Compute.sc ├── GPUDebugUtils.ESSL_310.Fragment.glsl ├── GPUDebugUtils.ESSL_310.Fragment.sc ├── GPUDebugUtils.ESSL_310.Vertex.glsl └── GPUDebugUtils.ESSL_310.Vertex.sc ├── GamefaceClearQuad ├── GamefaceClearQuad.ESSL_310.Fragment.glsl ├── GamefaceClearQuad.ESSL_310.Fragment.sc ├── GamefaceClearQuad.ESSL_310.Vertex.glsl ├── GamefaceClearQuad.ESSL_310.Vertex.sc └── GamefaceClearQuad.varying.def.sc ├── GamefacePath ├── GamefacePath.ESSL_310.Fragment.glsl ├── GamefacePath.ESSL_310.Fragment.sc ├── GamefacePath.ESSL_310.Vertex.glsl ├── GamefacePath.ESSL_310.Vertex.sc └── GamefacePath.varying.def.sc ├── GamefaceRenoir ├── GamefaceRenoir.ESSL_310.Fragment.glsl ├── GamefaceRenoir.ESSL_310.Fragment.sc ├── GamefaceRenoir.ESSL_310.Vertex.glsl ├── GamefaceRenoir.ESSL_310.Vertex.sc └── GamefaceRenoir.varying.def.sc ├── GamefaceStandard ├── GamefaceStandard.ESSL_310.Fragment.glsl ├── GamefaceStandard.ESSL_310.Fragment.sc ├── GamefaceStandard.ESSL_310.Vertex.glsl ├── GamefaceStandard.ESSL_310.Vertex.sc └── GamefaceStandard.varying.def.sc ├── GamefaceStandardBatched ├── GamefaceStandardBatched.ESSL_310.Fragment.glsl ├── GamefaceStandardBatched.ESSL_310.Fragment.sc ├── GamefaceStandardBatched.ESSL_310.Vertex.glsl ├── GamefaceStandardBatched.ESSL_310.Vertex.sc └── GamefaceStandardBatched.varying.def.sc ├── GamefaceStandardRare ├── GamefaceStandardRare.ESSL_310.Fragment.glsl ├── GamefaceStandardRare.ESSL_310.Fragment.sc ├── GamefaceStandardRare.ESSL_310.Vertex.glsl ├── GamefaceStandardRare.ESSL_310.Vertex.sc └── GamefaceStandardRare.varying.def.sc ├── GamefaceStencil ├── GamefaceStencil.ESSL_310.Fragment.glsl ├── GamefaceStencil.ESSL_310.Fragment.sc ├── GamefaceStencil.ESSL_310.Vertex.glsl ├── GamefaceStencil.ESSL_310.Vertex.sc └── GamefaceStencil.varying.def.sc ├── GamefaceStencilPath ├── GamefaceStencilPath.ESSL_310.Fragment.glsl ├── GamefaceStencilPath.ESSL_310.Fragment.sc ├── GamefaceStencilPath.ESSL_310.Vertex.glsl ├── GamefaceStencilPath.ESSL_310.Vertex.sc └── GamefaceStencilPath.varying.def.sc ├── GamefaceStencilRare ├── GamefaceStencilRare.ESSL_310.Fragment.glsl ├── GamefaceStencilRare.ESSL_310.Fragment.sc ├── GamefaceStencilRare.ESSL_310.Vertex.glsl ├── GamefaceStencilRare.ESSL_310.Vertex.sc └── GamefaceStencilRare.varying.def.sc ├── GamefaceTexturesWithColorMix ├── GamefaceTexturesWithColorMix.ESSL_310.Fragment.glsl ├── GamefaceTexturesWithColorMix.ESSL_310.Fragment.sc ├── GamefaceTexturesWithColorMix.ESSL_310.Vertex.glsl ├── GamefaceTexturesWithColorMix.ESSL_310.Vertex.sc └── GamefaceTexturesWithColorMix.varying.def.sc ├── ImGui ├── ImGui.ESSL_310.Fragment.glsl ├── ImGui.ESSL_310.Fragment.sc ├── ImGui.ESSL_310.Vertex.glsl ├── ImGui.ESSL_310.Vertex.sc └── ImGui.varying.def.sc ├── ItemInHandColor ├── ItemInHandColor.ESSL_310.Fragment.glsl ├── ItemInHandColor.ESSL_310.Fragment.sc ├── ItemInHandColor.ESSL_310.Vertex.glsl ├── ItemInHandColor.ESSL_310.Vertex.sc └── ItemInHandColor.varying.def.sc ├── ItemInHandColorGlint ├── ItemInHandColorGlint.ESSL_310.Fragment.glsl ├── ItemInHandColorGlint.ESSL_310.Fragment.sc ├── ItemInHandColorGlint.ESSL_310.Vertex.glsl ├── ItemInHandColorGlint.ESSL_310.Vertex.sc └── ItemInHandColorGlint.varying.def.sc ├── ItemInHandForwardPBR ├── ItemInHandForwardPBR.ESSL_310.Fragment.glsl ├── ItemInHandForwardPBR.ESSL_310.Fragment.sc ├── ItemInHandForwardPBR.ESSL_310.Vertex.glsl ├── ItemInHandForwardPBR.ESSL_310.Vertex.sc └── ItemInHandForwardPBR.varying.def.sc ├── ItemInHandForwardPBRGlint ├── ItemInHandForwardPBRGlint.ESSL_310.Fragment.glsl ├── ItemInHandForwardPBRGlint.ESSL_310.Fragment.sc ├── ItemInHandForwardPBRGlint.ESSL_310.Vertex.glsl ├── ItemInHandForwardPBRGlint.ESSL_310.Vertex.sc └── ItemInHandForwardPBRGlint.varying.def.sc ├── ItemInHandForwardPBRTextured ├── ItemInHandForwardPBRTextured.ESSL_310.Fragment.glsl ├── ItemInHandForwardPBRTextured.ESSL_310.Fragment.sc ├── ItemInHandForwardPBRTextured.ESSL_310.Vertex.glsl ├── ItemInHandForwardPBRTextured.ESSL_310.Vertex.sc └── ItemInHandForwardPBRTextured.varying.def.sc ├── ItemInHandPrepass ├── ItemInHandPrepass.ESSL_310.Fragment.glsl ├── ItemInHandPrepass.ESSL_310.Fragment.sc ├── ItemInHandPrepass.ESSL_310.Vertex.glsl ├── ItemInHandPrepass.ESSL_310.Vertex.sc └── ItemInHandPrepass.varying.def.sc ├── ItemInHandPrepassGlint ├── ItemInHandPrepassGlint.ESSL_310.Fragment.glsl ├── ItemInHandPrepassGlint.ESSL_310.Fragment.sc ├── ItemInHandPrepassGlint.ESSL_310.Vertex.glsl ├── ItemInHandPrepassGlint.ESSL_310.Vertex.sc └── ItemInHandPrepassGlint.varying.def.sc ├── ItemInHandPrepassTextured ├── ItemInHandPrepassTextured.ESSL_310.Fragment.glsl ├── ItemInHandPrepassTextured.ESSL_310.Fragment.sc ├── ItemInHandPrepassTextured.ESSL_310.Vertex.glsl ├── ItemInHandPrepassTextured.ESSL_310.Vertex.sc └── ItemInHandPrepassTextured.varying.def.sc ├── ItemInHandTextured ├── ItemInHandTextured.ESSL_310.Fragment.glsl ├── ItemInHandTextured.ESSL_310.Fragment.sc ├── ItemInHandTextured.ESSL_310.Vertex.glsl ├── ItemInHandTextured.ESSL_310.Vertex.sc └── ItemInHandTextured.varying.def.sc ├── LegacyCubemap ├── LegacyCubemap.ESSL_310.Fragment.glsl ├── LegacyCubemap.ESSL_310.Fragment.sc ├── LegacyCubemap.ESSL_310.Vertex.glsl ├── LegacyCubemap.ESSL_310.Vertex.sc └── LegacyCubemap.varying.def.sc ├── LegacyCubemapForwardPBR ├── LegacyCubemapForwardPBR.ESSL_310.Fragment.glsl ├── LegacyCubemapForwardPBR.ESSL_310.Fragment.sc ├── LegacyCubemapForwardPBR.ESSL_310.Vertex.glsl ├── LegacyCubemapForwardPBR.ESSL_310.Vertex.sc └── LegacyCubemapForwardPBR.varying.def.sc ├── LightClustering ├── LightClustering.ESSL_310.Compute.glsl ├── LightClustering.ESSL_310.Compute.sc ├── LightClustering.ESSL_310.Fragment.glsl ├── LightClustering.ESSL_310.Fragment.sc ├── LightClustering.ESSL_310.Vertex.glsl └── LightClustering.ESSL_310.Vertex.sc ├── LuminanceHistogram ├── LuminanceHistogram.ESSL_310.Compute.glsl ├── LuminanceHistogram.ESSL_310.Compute.sc ├── LuminanceHistogram.ESSL_310.Fragment.glsl ├── LuminanceHistogram.ESSL_310.Fragment.sc ├── LuminanceHistogram.ESSL_310.Vertex.glsl └── LuminanceHistogram.ESSL_310.Vertex.sc ├── MeshFallbackForwardPBR ├── MeshFallbackForwardPBR.ESSL_310.Fragment.glsl ├── MeshFallbackForwardPBR.ESSL_310.Fragment.sc ├── MeshFallbackForwardPBR.ESSL_310.Vertex.glsl ├── MeshFallbackForwardPBR.ESSL_310.Vertex.sc └── MeshFallbackForwardPBR.varying.def.sc ├── MeshFallbackPosUVNormalColor ├── MeshFallbackPosUVNormalColor.ESSL_310.Fragment.glsl ├── MeshFallbackPosUVNormalColor.ESSL_310.Fragment.sc ├── MeshFallbackPosUVNormalColor.ESSL_310.Unknown.glsl ├── MeshFallbackPosUVNormalColor.ESSL_310.Unknown.sc ├── MeshFallbackPosUVNormalColor.ESSL_310.Vertex.glsl ├── MeshFallbackPosUVNormalColor.ESSL_310.Vertex.sc └── MeshFallbackPosUVNormalColor.varying.def.sc ├── MeshFallbackPrepass ├── MeshFallbackPrepass.ESSL_310.Fragment.glsl ├── MeshFallbackPrepass.ESSL_310.Fragment.sc ├── MeshFallbackPrepass.ESSL_310.Vertex.glsl ├── MeshFallbackPrepass.ESSL_310.Vertex.sc └── MeshFallbackPrepass.varying.def.sc ├── MinecraftColor ├── MinecraftColor.ESSL_310.Fragment.glsl ├── MinecraftColor.ESSL_310.Fragment.sc ├── MinecraftColor.ESSL_310.Vertex.glsl ├── MinecraftColor.ESSL_310.Vertex.sc └── MinecraftColor.varying.def.sc ├── Mip ├── Mip.ESSL_310.Compute.glsl ├── Mip.ESSL_310.Compute.sc ├── Mip.ESSL_310.Fragment.glsl ├── Mip.ESSL_310.Fragment.sc ├── Mip.ESSL_310.Vertex.glsl └── Mip.ESSL_310.Vertex.sc ├── Particle ├── Particle.ESSL_310.Fragment.glsl ├── Particle.ESSL_310.Fragment.sc ├── Particle.ESSL_310.Vertex.glsl ├── Particle.ESSL_310.Vertex.sc └── Particle.varying.def.sc ├── ParticleForwardPBR ├── ParticleForwardPBR.ESSL_310.Fragment.glsl ├── ParticleForwardPBR.ESSL_310.Fragment.sc ├── ParticleForwardPBR.ESSL_310.Vertex.glsl ├── ParticleForwardPBR.ESSL_310.Vertex.sc └── ParticleForwardPBR.varying.def.sc ├── ParticlePrepass ├── ParticlePrepass.ESSL_310.Fragment.glsl ├── ParticlePrepass.ESSL_310.Fragment.sc ├── ParticlePrepass.ESSL_310.Vertex.glsl ├── ParticlePrepass.ESSL_310.Vertex.sc └── ParticlePrepass.varying.def.sc ├── PopulateVolume ├── PopulateVolume.ESSL_310.Compute.glsl ├── PopulateVolume.ESSL_310.Compute.sc ├── PopulateVolume.ESSL_310.Fragment.glsl ├── PopulateVolume.ESSL_310.Fragment.sc ├── PopulateVolume.ESSL_310.Vertex.glsl └── PopulateVolume.ESSL_310.Vertex.sc ├── PostFX.Debug ├── PostFX.Debug.ESSL_310.Fragment.glsl ├── PostFX.Debug.ESSL_310.Fragment.sc ├── PostFX.Debug.ESSL_310.Vertex.glsl ├── PostFX.Debug.ESSL_310.Vertex.sc └── PostFX.Debug.varying.def.sc ├── PrepassFallback ├── PrepassFallback.ESSL_310.Fragment.glsl ├── PrepassFallback.ESSL_310.Fragment.sc ├── PrepassFallback.ESSL_310.Vertex.glsl └── PrepassFallback.ESSL_310.Vertex.sc ├── RTXPostFX.Bloom ├── RTXPostFX.Bloom.ESSL_310.Fragment.glsl ├── RTXPostFX.Bloom.ESSL_310.Fragment.sc ├── RTXPostFX.Bloom.ESSL_310.Vertex.glsl ├── RTXPostFX.Bloom.ESSL_310.Vertex.sc └── RTXPostFX.Bloom.varying.def.sc ├── RTXPostFX.Tonemapping ├── RTXPostFX.Tonemapping.ESSL_310.Fragment.glsl ├── RTXPostFX.Tonemapping.ESSL_310.Fragment.sc ├── RTXPostFX.Tonemapping.ESSL_310.Vertex.glsl ├── RTXPostFX.Tonemapping.ESSL_310.Vertex.sc └── RTXPostFX.Tonemapping.varying.def.sc ├── RenderChunk ├── RenderChunk.ESSL_310.Fragment.glsl ├── RenderChunk.ESSL_310.Fragment.sc ├── RenderChunk.ESSL_310.Vertex.glsl ├── RenderChunk.ESSL_310.Vertex.sc └── RenderChunk.varying.def.sc ├── RenderChunkForwardPBR ├── RenderChunkForwardPBR.ESSL_310.Fragment.glsl ├── RenderChunkForwardPBR.ESSL_310.Fragment.sc ├── RenderChunkForwardPBR.ESSL_310.Vertex.glsl ├── RenderChunkForwardPBR.ESSL_310.Vertex.sc └── RenderChunkForwardPBR.varying.def.sc ├── RenderChunkPrepass ├── RenderChunkPrepass.ESSL_310.Fragment.glsl ├── RenderChunkPrepass.ESSL_310.Fragment.sc ├── RenderChunkPrepass.ESSL_310.Vertex.glsl ├── RenderChunkPrepass.ESSL_310.Vertex.sc └── RenderChunkPrepass.varying.def.sc ├── ScreenBlit ├── ScreenBlit.ESSL_310.Fragment.glsl ├── ScreenBlit.ESSL_310.Fragment.sc ├── ScreenBlit.ESSL_310.Vertex.glsl ├── ScreenBlit.ESSL_310.Vertex.sc └── ScreenBlit.varying.def.sc ├── ScreenSpaceReflections ├── ScreenSpaceReflections.ESSL_310.Fragment.glsl ├── ScreenSpaceReflections.ESSL_310.Fragment.sc ├── ScreenSpaceReflections.ESSL_310.Vertex.glsl ├── ScreenSpaceReflections.ESSL_310.Vertex.sc └── ScreenSpaceReflections.varying.def.sc ├── ScreenUV ├── ScreenUV.ESSL_310.Fragment.glsl ├── ScreenUV.ESSL_310.Fragment.sc ├── ScreenUV.ESSL_310.Vertex.glsl ├── ScreenUV.ESSL_310.Vertex.sc └── ScreenUV.varying.def.sc ├── ShadowOverlay ├── ShadowOverlay.ESSL_310.Fragment.glsl ├── ShadowOverlay.ESSL_310.Fragment.sc ├── ShadowOverlay.ESSL_310.Vertex.glsl ├── ShadowOverlay.ESSL_310.Vertex.sc └── ShadowOverlay.varying.def.sc ├── ShadowVolume ├── ShadowVolume.ESSL_310.Fragment.glsl ├── ShadowVolume.ESSL_310.Fragment.sc ├── ShadowVolume.ESSL_310.Vertex.glsl ├── ShadowVolume.ESSL_310.Vertex.sc └── ShadowVolume.varying.def.sc ├── SimpleOccluder ├── SimpleOccluder.ESSL_310.Fragment.glsl ├── SimpleOccluder.ESSL_310.Fragment.sc ├── SimpleOccluder.ESSL_310.Vertex.glsl ├── SimpleOccluder.ESSL_310.Vertex.sc └── SimpleOccluder.varying.def.sc ├── Sky ├── Sky.ESSL_310.Fragment.glsl ├── Sky.ESSL_310.Fragment.sc ├── Sky.ESSL_310.Vertex.glsl ├── Sky.ESSL_310.Vertex.sc └── Sky.varying.def.sc ├── SkyProbeDeferredShading ├── SkyProbeDeferredShading.ESSL_310.Fragment.glsl ├── SkyProbeDeferredShading.ESSL_310.Fragment.sc ├── SkyProbeDeferredShading.ESSL_310.Vertex.glsl ├── SkyProbeDeferredShading.ESSL_310.Vertex.sc └── SkyProbeDeferredShading.varying.def.sc ├── SpecularConvolution ├── SpecularConvolution.ESSL_310.Fragment.glsl ├── SpecularConvolution.ESSL_310.Fragment.sc ├── SpecularConvolution.ESSL_310.Vertex.glsl ├── SpecularConvolution.ESSL_310.Vertex.sc └── SpecularConvolution.varying.def.sc ├── StandardRed ├── StandardRed.ESSL_310.Fragment.glsl ├── StandardRed.ESSL_310.Fragment.sc ├── StandardRed.ESSL_310.Vertex.glsl ├── StandardRed.ESSL_310.Vertex.sc └── StandardRed.varying.def.sc ├── Stars ├── Stars.ESSL_310.Fragment.glsl ├── Stars.ESSL_310.Fragment.sc ├── Stars.ESSL_310.Vertex.glsl ├── Stars.ESSL_310.Vertex.sc └── Stars.varying.def.sc ├── StarsForwardPBR ├── StarsForwardPBR.ESSL_310.Fragment.glsl ├── StarsForwardPBR.ESSL_310.Fragment.sc ├── StarsForwardPBR.ESSL_310.Vertex.glsl ├── StarsForwardPBR.ESSL_310.Vertex.sc └── StarsForwardPBR.varying.def.sc ├── SunMoon ├── SunMoon.ESSL_310.Fragment.glsl ├── SunMoon.ESSL_310.Fragment.sc ├── SunMoon.ESSL_310.Vertex.glsl ├── SunMoon.ESSL_310.Vertex.sc └── SunMoon.varying.def.sc ├── SunMoonForwardPBR ├── SunMoonForwardPBR.ESSL_310.Fragment.glsl ├── SunMoonForwardPBR.ESSL_310.Fragment.sc ├── SunMoonForwardPBR.ESSL_310.Vertex.glsl ├── SunMoonForwardPBR.ESSL_310.Vertex.sc └── SunMoonForwardPBR.varying.def.sc ├── UIBase ├── UIBase.ESSL_310.Fragment.glsl ├── UIBase.ESSL_310.Fragment.sc ├── UIBase.ESSL_310.Vertex.glsl ├── UIBase.ESSL_310.Vertex.sc └── UIBase.varying.def.sc ├── UIBlit ├── UIBlit.ESSL_310.Fragment.glsl ├── UIBlit.ESSL_310.Fragment.sc ├── UIBlit.ESSL_310.Vertex.glsl ├── UIBlit.ESSL_310.Vertex.sc └── UIBlit.varying.def.sc ├── UIFill ├── UIFill.ESSL_310.Fragment.glsl ├── UIFill.ESSL_310.Fragment.sc ├── UIFill.ESSL_310.Vertex.glsl ├── UIFill.ESSL_310.Vertex.sc └── UIFill.varying.def.sc ├── UIGlint ├── UIGlint.ESSL_310.Fragment.glsl ├── UIGlint.ESSL_310.Fragment.sc ├── UIGlint.ESSL_310.Vertex.glsl ├── UIGlint.ESSL_310.Vertex.sc └── UIGlint.varying.def.sc ├── UISprite ├── UISprite.ESSL_310.Fragment.glsl ├── UISprite.ESSL_310.Fragment.sc ├── UISprite.ESSL_310.Vertex.glsl ├── UISprite.ESSL_310.Vertex.sc └── UISprite.varying.def.sc ├── UIText ├── UIText.ESSL_310.Fragment.glsl ├── UIText.ESSL_310.Fragment.sc ├── UIText.ESSL_310.Vertex.glsl ├── UIText.ESSL_310.Vertex.sc └── UIText.varying.def.sc ├── Upscaling ├── Upscaling.ESSL_310.Fragment.glsl ├── Upscaling.ESSL_310.Fragment.sc ├── Upscaling.ESSL_310.Vertex.glsl ├── Upscaling.ESSL_310.Vertex.sc └── Upscaling.varying.def.sc ├── VolumeScattering ├── VolumeScattering.ESSL_310.Compute.glsl ├── VolumeScattering.ESSL_310.Compute.sc ├── VolumeScattering.ESSL_310.Fragment.glsl ├── VolumeScattering.ESSL_310.Fragment.sc ├── VolumeScattering.ESSL_310.Vertex.glsl └── VolumeScattering.ESSL_310.Vertex.sc ├── WaterForwardPBR ├── WaterForwardPBR.ESSL_310.Fragment.glsl ├── WaterForwardPBR.ESSL_310.Fragment.sc ├── WaterForwardPBR.ESSL_310.Vertex.glsl ├── WaterForwardPBR.ESSL_310.Vertex.sc └── WaterForwardPBR.varying.def.sc ├── Weather ├── Weather.ESSL_310.Fragment.glsl ├── Weather.ESSL_310.Fragment.sc ├── Weather.ESSL_310.Vertex.glsl ├── Weather.ESSL_310.Vertex.sc └── Weather.varying.def.sc ├── WeatherForwardPBR ├── WeatherForwardPBR.ESSL_310.Fragment.glsl ├── WeatherForwardPBR.ESSL_310.Fragment.sc ├── WeatherForwardPBR.ESSL_310.Vertex.glsl ├── WeatherForwardPBR.ESSL_310.Vertex.sc └── WeatherForwardPBR.varying.def.sc └── displaymap ├── displaymap.ESSL_310.Fragment.glsl ├── displaymap.ESSL_310.Fragment.sc ├── displaymap.ESSL_310.Vertex.glsl ├── displaymap.ESSL_310.Vertex.sc └── displaymap.varying.def.sc /README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | This repository contains vanilla Minecraft: Bedrock Edition GLSL and BGFX SC shaders. 4 | 5 | Shader code is auto-generated with [lazurite](https://github.com/veka0/lazurite) using material.bin files extracted from Android MCBE version. 6 | 7 | ## Branches 8 | 9 | Different editions are divided into separate branches 10 | 11 | - `main` - release versions 12 | - `preview` - preview versions 13 | 14 | ## Reconstructed BGFX SC code 15 | 16 | BGFX SC code is generated by further processing GLSL. 17 | `// Attention!` comment is inserted into places where a potential manual editing is required. Currently, it might indicate: 18 | 19 | - Potential matrix multiplication (needs to be replaced with `mul()`. Note that vec\*vec in GLSL is component-wise, 20 | while mul(vec, vec) in HLSL returns a dot product, therefore `mul()` cannot be used for multiplying 2 vectors). 21 | - Matrix element access (index row-column order needs to be inverted for platforms other than GLSL. 22 | Note that [x][y] syntax could also be used for accessing component of a vector array, in which case inverting indices is not needed). 23 | 24 | For example, the following code: 25 | 26 | ```glsl 27 | vec4 jitterVertexPosition(vec3 worldPosition) { 28 | mat4 offsetProj = Proj; 29 | offsetProj[2][0] += SubPixelOffset.x; // Attention! 30 | offsetProj[2][1] -= SubPixelOffset.y; // Attention! 31 | return ((offsetProj) * (((View) * (vec4(worldPosition, 1.0f))))); // Attention! 32 | } 33 | ``` 34 | 35 | Should be edited into this: 36 | 37 | ```glsl 38 | vec4 jitterVertexPosition(vec3 worldPosition) { 39 | mat4 offsetProj = Proj; 40 | #if BGFX_SHADER_LANGUAGE_GLSL 41 | offsetProj[2][0] += SubPixelOffset.x; 42 | offsetProj[2][1] -= SubPixelOffset.y; 43 | #else 44 | offsetProj[0][2] += SubPixelOffset.x; 45 | offsetProj[1][2] -= SubPixelOffset.y; 46 | #endif 47 | return mul(offsetProj, mul(View, vec4(worldPosition, 1.0f))); 48 | } 49 | ``` 50 | 51 | ## Accuracy 52 | 53 | Generated code is usually accurate, however sometimes the tool is unable to generate exact macro condition, in that case it will use the best approximation it could find and insert a comment just before macro condition, which will look like this: 54 | 55 | ```glsl 56 | // Approximation, matches 44 cases out of 48 57 | #if defined(SEASONS__ON) && !defined(DEPTH_ONLY_OPAQUE_PASS) && !defined(DEPTH_ONLY_PASS) && !defined(TRANSPARENT_PBR_PASS) 58 | vec3 vec3_splat(float _x) { return vec3(_x, _x, _x); } 59 | #endif 60 | ``` 61 | 62 | which means the following macro condition is accurate for 44 shader variants out of the total 48 available in material.bin file. 63 | -------------------------------------------------------------------------------- /materials/Actor/Actor.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_light : COLOR3; 14 | centroid vec2 v_texcoord0 : TEXCOORD0; 15 | vec3 v_worldPos : TEXCOORD3; 16 | -------------------------------------------------------------------------------- /materials/ActorBanner/ActorBanner.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_light : COLOR3; 14 | centroid vec2 v_texcoord0 : TEXCOORD0; 15 | centroid vec4 v_texcoords : TEXCOORD2; 16 | vec3 v_worldPos : TEXCOORD3; 17 | -------------------------------------------------------------------------------- /materials/ActorBannerForwardPBR/ActorBannerForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | centroid vec4 v_texcoords : TEXCOORD2; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ActorBannerPrepass/ActorBannerPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | centroid vec4 v_texcoords : TEXCOORD2; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ActorBase/ActorBase.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | centroid vec2 v_texcoord0 : TEXCOORD0; 13 | vec3 v_worldPos : TEXCOORD3; 14 | -------------------------------------------------------------------------------- /materials/ActorForwardPBR/ActorForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorGlint/ActorGlint.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_layerUv : TEXCOORD2; 14 | vec4 v_light : COLOR3; 15 | centroid vec2 v_texcoord0 : TEXCOORD0; 16 | vec3 v_worldPos : TEXCOORD3; 17 | -------------------------------------------------------------------------------- /materials/ActorGlintForwardPBR/ActorGlintForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_layerUv : TEXCOORD2; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | centroid vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ActorGlintPrepass/ActorGlintPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_layerUv : TEXCOORD2; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | centroid vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ActorMultiTexture/ActorMultiTexture.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_light : COLOR3; 14 | centroid vec2 v_texcoord0 : TEXCOORD0; 15 | vec3 v_worldPos : TEXCOORD3; 16 | -------------------------------------------------------------------------------- /materials/ActorMultiTextureForwardPBR/ActorMultiTextureForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorMultiTexturePrepass/ActorMultiTexturePrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorPattern/ActorPattern.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_light : COLOR3; 14 | centroid vec2 v_texcoord0 : TEXCOORD0; 15 | centroid vec4 v_texcoords : TEXCOORD2; 16 | vec3 v_worldPos : TEXCOORD3; 17 | -------------------------------------------------------------------------------- /materials/ActorPatternForwardPBR/ActorPatternForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorPatternGlint/ActorPatternGlint.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_layerUv : TEXCOORD1; 14 | vec4 v_light : COLOR3; 15 | centroid vec2 v_texcoord0 : TEXCOORD0; 16 | centroid vec4 v_texcoords : TEXCOORD2; 17 | vec3 v_worldPos : TEXCOORD3; 18 | -------------------------------------------------------------------------------- /materials/ActorPatternPrepass/ActorPatternPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorPrepass/ActorPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorTint/ActorTint.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_light : COLOR3; 14 | centroid vec2 v_texcoord0 : TEXCOORD0; 15 | vec3 v_worldPos : TEXCOORD3; 16 | -------------------------------------------------------------------------------- /materials/ActorTintForwardPBR/ActorTintForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/ActorTintPrepass/ActorTintPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec3 v_normal : NORMAL; 15 | vec3 v_prevWorldPos : TEXCOORD4; 16 | vec3 v_tangent : TANGENT; 17 | centroid vec2 v_texcoord0 : TEXCOORD0; 18 | vec3 v_worldPos : TEXCOORD3; 19 | -------------------------------------------------------------------------------- /materials/Basic/Basic.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec4 a_tangent : TANGENT; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec3 v_bitangent : BITANGENT; 12 | vec4 v_color0 : COLOR0; 13 | vec3 v_normal : NORMAL; 14 | vec3 v_tangent : TANGENT; 15 | vec2 v_texcoord0 : TEXCOORD0; 16 | vec3 v_viewDir : TEXCOORD2; 17 | vec3 v_wpos : TEXCOORD1; 18 | -------------------------------------------------------------------------------- /materials/BeaconBeam/BeaconBeam.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 v_color : COLOR0; 7 | vec4 v_fog : COLOR2; 8 | vec4 v_light : COLOR1; 9 | vec2 v_texCoords : TEXCOORD0; 10 | -------------------------------------------------------------------------------- /materials/Blit/Blit.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | vec2 texcoord0; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | vec2 texcoord0; 54 | }; 55 | 56 | struct FragmentInput { 57 | vec2 texcoord0; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | SAMPLER2D_AUTOREG(s_BlitTexture); 65 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 66 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 67 | vertOutput.texcoord0 = vertInput.texcoord0; 68 | } 69 | void main() { 70 | VertexInput vertexInput; 71 | VertexOutput vertexOutput; 72 | vertexInput.position = (a_position); 73 | vertexInput.texcoord0 = (a_texcoord0); 74 | vertexOutput.texcoord0 = vec2(0, 0); 75 | vertexOutput.position = vec4(0, 0, 0, 0); 76 | ViewRect = u_viewRect; 77 | Proj = u_proj; 78 | View = u_view; 79 | ViewTexel = u_viewTexel; 80 | InvView = u_invView; 81 | InvProj = u_invProj; 82 | ViewProj = u_viewProj; 83 | InvViewProj = u_invViewProj; 84 | PrevViewProj = u_prevViewProj; 85 | { 86 | WorldArray[0] = u_model[0]; 87 | WorldArray[1] = u_model[1]; 88 | WorldArray[2] = u_model[2]; 89 | WorldArray[3] = u_model[3]; 90 | } 91 | World = u_model[0]; 92 | WorldView = u_modelView; 93 | WorldViewProj = u_modelViewProj; 94 | PrevWorldPosOffset = u_prevWorldPosOffset; 95 | AlphaRef4 = u_alphaRef4; 96 | AlphaRef = u_alphaRef4.x; 97 | Vert(vertexInput, vertexOutput); 98 | v_texcoord0 = vertexOutput.texcoord0; 99 | gl_Position = vertexOutput.position; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /materials/Blit/Blit.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/BlitColor/BlitColor.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 TintColor; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | vec2 texcoord0; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | vec2 texcoord0; 55 | }; 56 | 57 | struct FragmentInput { 58 | vec2 texcoord0; 59 | }; 60 | 61 | struct FragmentOutput { 62 | vec4 Color0; 63 | }; 64 | 65 | SAMPLER2D_AUTOREG(s_BlitTexture); 66 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 67 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 68 | vertOutput.texcoord0 = vertInput.texcoord0; 69 | } 70 | void main() { 71 | VertexInput vertexInput; 72 | VertexOutput vertexOutput; 73 | vertexInput.position = (a_position); 74 | vertexInput.texcoord0 = (a_texcoord0); 75 | vertexOutput.texcoord0 = vec2(0, 0); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | v_texcoord0 = vertexOutput.texcoord0; 100 | gl_Position = vertexOutput.position; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /materials/BlitColor/BlitColor.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/BlockOutlineSelection/BlockOutlineSelection.ESSL_310.Fragment.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - OPAQUE_PASS (not used) 8 | */ 9 | 10 | #if GL_FRAGMENT_PRECISION_HIGH 11 | precision highp float; 12 | #else 13 | precision mediump float; 14 | #endif 15 | #define attribute in 16 | #define varying in 17 | out vec4 bgfx_FragColor; 18 | struct NoopSampler { 19 | int noop; 20 | }; 21 | 22 | struct NoopImage2D { 23 | int noop; 24 | }; 25 | 26 | struct NoopImage3D { 27 | int noop; 28 | }; 29 | 30 | struct rayQueryKHR { 31 | int noop; 32 | }; 33 | 34 | struct accelerationStructureKHR { 35 | int noop; 36 | }; 37 | 38 | uniform vec4 u_viewRect; 39 | uniform mat4 u_proj; 40 | uniform mat4 u_view; 41 | uniform vec4 u_viewTexel; 42 | uniform mat4 u_invView; 43 | uniform mat4 u_invProj; 44 | uniform mat4 u_viewProj; 45 | uniform mat4 u_invViewProj; 46 | uniform mat4 u_prevViewProj; 47 | uniform mat4 u_model[4]; 48 | uniform mat4 u_modelView; 49 | uniform mat4 u_modelViewProj; 50 | uniform vec4 u_prevWorldPosOffset; 51 | uniform vec4 u_alphaRef4; 52 | uniform vec4 OutlineColor; 53 | uniform vec4 SubPixelOffset; 54 | vec4 ViewRect; 55 | mat4 Proj; 56 | mat4 View; 57 | vec4 ViewTexel; 58 | mat4 InvView; 59 | mat4 InvProj; 60 | mat4 ViewProj; 61 | mat4 InvViewProj; 62 | mat4 PrevViewProj; 63 | mat4 WorldArray[4]; 64 | mat4 World; 65 | mat4 WorldView; 66 | mat4 WorldViewProj; 67 | vec4 PrevWorldPosOffset; 68 | vec4 AlphaRef4; 69 | float AlphaRef; 70 | struct VertexInput { 71 | vec3 position; 72 | }; 73 | 74 | struct VertexOutput { 75 | vec4 position; 76 | }; 77 | 78 | struct FragmentInput { 79 | float dummy; 80 | }; 81 | 82 | struct FragmentOutput { 83 | vec4 Color0; 84 | }; 85 | 86 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 87 | fragOutput.Color0 = OutlineColor; 88 | } 89 | void main() { 90 | FragmentInput fragmentInput; 91 | FragmentOutput fragmentOutput; 92 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 93 | ViewRect = u_viewRect; 94 | Proj = u_proj; 95 | View = u_view; 96 | ViewTexel = u_viewTexel; 97 | InvView = u_invView; 98 | InvProj = u_invProj; 99 | ViewProj = u_viewProj; 100 | InvViewProj = u_invViewProj; 101 | PrevViewProj = u_prevViewProj; 102 | { 103 | WorldArray[0] = u_model[0]; 104 | WorldArray[1] = u_model[1]; 105 | WorldArray[2] = u_model[2]; 106 | WorldArray[3] = u_model[3]; 107 | } 108 | World = u_model[0]; 109 | WorldView = u_modelView; 110 | WorldViewProj = u_modelViewProj; 111 | PrevWorldPosOffset = u_prevWorldPosOffset; 112 | AlphaRef4 = u_alphaRef4; 113 | AlphaRef = u_alphaRef4.x; 114 | Frag(fragmentInput, fragmentOutput); 115 | bgfx_FragColor = fragmentOutput.Color0; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /materials/BlockOutlineSelection/BlockOutlineSelection.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - OPAQUE_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | uniform vec4 OutlineColor; 29 | uniform vec4 SubPixelOffset; 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | }; 53 | 54 | struct FragmentInput { 55 | float dummy; 56 | }; 57 | 58 | struct FragmentOutput { 59 | vec4 Color0; 60 | }; 61 | 62 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 63 | fragOutput.Color0 = OutlineColor; 64 | } 65 | void main() { 66 | FragmentInput fragmentInput; 67 | FragmentOutput fragmentOutput; 68 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 69 | ViewRect = u_viewRect; 70 | Proj = u_proj; 71 | View = u_view; 72 | ViewTexel = u_viewTexel; 73 | InvView = u_invView; 74 | InvProj = u_invProj; 75 | ViewProj = u_viewProj; 76 | InvViewProj = u_invViewProj; 77 | PrevViewProj = u_prevViewProj; 78 | { 79 | WorldArray[0] = u_model[0]; 80 | WorldArray[1] = u_model[1]; 81 | WorldArray[2] = u_model[2]; 82 | WorldArray[3] = u_model[3]; 83 | } 84 | World = u_model[0]; 85 | WorldView = u_modelView; 86 | WorldViewProj = u_modelViewProj; 87 | PrevWorldPosOffset = u_prevWorldPosOffset; 88 | AlphaRef4 = u_alphaRef4; 89 | AlphaRef = u_alphaRef4.x; 90 | Frag(fragmentInput, fragmentOutput); 91 | gl_FragColor = fragmentOutput.Color0; 92 | } 93 | 94 | -------------------------------------------------------------------------------- /materials/BlockOutlineSelection/BlockOutlineSelection.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - OPAQUE_PASS (not used) 6 | */ 7 | 8 | $input a_position 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 OutlineColor; 30 | uniform vec4 SubPixelOffset; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | vec4 jitterVertexPosition(vec3 worldPosition) { 64 | mat4 offsetProj = Proj; 65 | offsetProj[2][0] += SubPixelOffset.x; // Attention! 66 | offsetProj[2][1] -= SubPixelOffset.y; // Attention! 67 | return ((offsetProj) * (((View) * (vec4(worldPosition, 1.0f))))); // Attention! 68 | } 69 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 70 | vertOutput.position = jitterVertexPosition(vertInput.position.xyz); 71 | } 72 | void main() { 73 | VertexInput vertexInput; 74 | VertexOutput vertexOutput; 75 | vertexInput.position = (a_position); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | gl_Position = vertexOutput.position; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /materials/BlockOutlineSelection/BlockOutlineSelection.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | -------------------------------------------------------------------------------- /materials/BlockSelectionOutline/BlockSelectionOutline.ESSL_310.Fragment.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - OPAQUE_PASS (not used) 8 | */ 9 | 10 | #if GL_FRAGMENT_PRECISION_HIGH 11 | precision highp float; 12 | #else 13 | precision mediump float; 14 | #endif 15 | #define attribute in 16 | #define varying in 17 | out vec4 bgfx_FragColor; 18 | struct NoopSampler { 19 | int noop; 20 | }; 21 | 22 | struct NoopImage2D { 23 | int noop; 24 | }; 25 | 26 | struct NoopImage3D { 27 | int noop; 28 | }; 29 | 30 | struct rayQueryKHR { 31 | int noop; 32 | }; 33 | 34 | struct accelerationStructureKHR { 35 | int noop; 36 | }; 37 | 38 | uniform vec4 u_viewRect; 39 | uniform mat4 u_proj; 40 | uniform mat4 u_view; 41 | uniform vec4 u_viewTexel; 42 | uniform mat4 u_invView; 43 | uniform mat4 u_invProj; 44 | uniform mat4 u_viewProj; 45 | uniform mat4 u_invViewProj; 46 | uniform mat4 u_prevViewProj; 47 | uniform mat4 u_model[4]; 48 | uniform mat4 u_modelView; 49 | uniform mat4 u_modelViewProj; 50 | uniform vec4 u_prevWorldPosOffset; 51 | uniform vec4 u_alphaRef4; 52 | uniform vec4 OutlineColor; 53 | uniform vec4 SubPixelOffset; 54 | vec4 ViewRect; 55 | mat4 Proj; 56 | mat4 View; 57 | vec4 ViewTexel; 58 | mat4 InvView; 59 | mat4 InvProj; 60 | mat4 ViewProj; 61 | mat4 InvViewProj; 62 | mat4 PrevViewProj; 63 | mat4 WorldArray[4]; 64 | mat4 World; 65 | mat4 WorldView; 66 | mat4 WorldViewProj; 67 | vec4 PrevWorldPosOffset; 68 | vec4 AlphaRef4; 69 | float AlphaRef; 70 | struct VertexInput { 71 | vec3 position; 72 | }; 73 | 74 | struct VertexOutput { 75 | vec4 position; 76 | }; 77 | 78 | struct FragmentInput { 79 | float dummy; 80 | }; 81 | 82 | struct FragmentOutput { 83 | vec4 Color0; 84 | }; 85 | 86 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 87 | fragOutput.Color0 = OutlineColor; 88 | } 89 | void main() { 90 | FragmentInput fragmentInput; 91 | FragmentOutput fragmentOutput; 92 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 93 | ViewRect = u_viewRect; 94 | Proj = u_proj; 95 | View = u_view; 96 | ViewTexel = u_viewTexel; 97 | InvView = u_invView; 98 | InvProj = u_invProj; 99 | ViewProj = u_viewProj; 100 | InvViewProj = u_invViewProj; 101 | PrevViewProj = u_prevViewProj; 102 | { 103 | WorldArray[0] = u_model[0]; 104 | WorldArray[1] = u_model[1]; 105 | WorldArray[2] = u_model[2]; 106 | WorldArray[3] = u_model[3]; 107 | } 108 | World = u_model[0]; 109 | WorldView = u_modelView; 110 | WorldViewProj = u_modelViewProj; 111 | PrevWorldPosOffset = u_prevWorldPosOffset; 112 | AlphaRef4 = u_alphaRef4; 113 | AlphaRef = u_alphaRef4.x; 114 | Frag(fragmentInput, fragmentOutput); 115 | bgfx_FragColor = fragmentOutput.Color0; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /materials/BlockSelectionOutline/BlockSelectionOutline.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - OPAQUE_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | uniform vec4 OutlineColor; 29 | uniform vec4 SubPixelOffset; 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | }; 53 | 54 | struct FragmentInput { 55 | float dummy; 56 | }; 57 | 58 | struct FragmentOutput { 59 | vec4 Color0; 60 | }; 61 | 62 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 63 | fragOutput.Color0 = OutlineColor; 64 | } 65 | void main() { 66 | FragmentInput fragmentInput; 67 | FragmentOutput fragmentOutput; 68 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 69 | ViewRect = u_viewRect; 70 | Proj = u_proj; 71 | View = u_view; 72 | ViewTexel = u_viewTexel; 73 | InvView = u_invView; 74 | InvProj = u_invProj; 75 | ViewProj = u_viewProj; 76 | InvViewProj = u_invViewProj; 77 | PrevViewProj = u_prevViewProj; 78 | { 79 | WorldArray[0] = u_model[0]; 80 | WorldArray[1] = u_model[1]; 81 | WorldArray[2] = u_model[2]; 82 | WorldArray[3] = u_model[3]; 83 | } 84 | World = u_model[0]; 85 | WorldView = u_modelView; 86 | WorldViewProj = u_modelViewProj; 87 | PrevWorldPosOffset = u_prevWorldPosOffset; 88 | AlphaRef4 = u_alphaRef4; 89 | AlphaRef = u_alphaRef4.x; 90 | Frag(fragmentInput, fragmentOutput); 91 | gl_FragColor = fragmentOutput.Color0; 92 | } 93 | 94 | -------------------------------------------------------------------------------- /materials/BlockSelectionOutline/BlockSelectionOutline.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - OPAQUE_PASS (not used) 6 | */ 7 | 8 | $input a_position 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 OutlineColor; 30 | uniform vec4 SubPixelOffset; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | vec4 jitterVertexPosition(vec3 worldPosition) { 64 | mat4 offsetProj = Proj; 65 | offsetProj[2][0] += SubPixelOffset.x; // Attention! 66 | offsetProj[2][1] -= SubPixelOffset.y; // Attention! 67 | return ((offsetProj) * (((View) * (vec4(worldPosition, 1.0f))))); // Attention! 68 | } 69 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 70 | vertOutput.position = jitterVertexPosition(vertInput.position.xyz); 71 | } 72 | void main() { 73 | VertexInput vertexInput; 74 | VertexOutput vertexOutput; 75 | vertexInput.position = (a_position); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | gl_Position = vertexOutput.position; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /materials/BlockSelectionOutline/BlockSelectionOutline.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | -------------------------------------------------------------------------------- /materials/BlockSelectionOverlay/BlockSelectionOverlay.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/BlockSelectionOverlayBlockEntity/BlockSelectionOverlayBlockEntity.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_indices, a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform mat4 Bones[8]; 31 | uniform vec4 MatColor; 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | int boneId; 50 | vec3 position; 51 | vec2 texcoord0; 52 | }; 53 | 54 | struct VertexOutput { 55 | vec4 position; 56 | vec2 texcoord0; 57 | }; 58 | 59 | struct FragmentInput { 60 | vec2 texcoord0; 61 | }; 62 | 63 | struct FragmentOutput { 64 | vec4 Color0; 65 | }; 66 | 67 | SAMPLER2D_AUTOREG(s_MatTexture); 68 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 69 | vec3 wpos = ((((World) * (Bones[vertInput.boneId]))) * (vec4(vertInput.position, 1.0))).xyz; // Attention! 70 | vertOutput.position = ((ViewProj) * (vec4(wpos, 1.0))); // Attention! 71 | vertOutput.position.z -= 1.0 / 8192.0; 72 | vertOutput.texcoord0 = vertInput.texcoord0; 73 | } 74 | void main() { 75 | VertexInput vertexInput; 76 | VertexOutput vertexOutput; 77 | vertexInput.boneId = int(a_indices); 78 | vertexInput.position = (a_position); 79 | vertexInput.texcoord0 = (a_texcoord0); 80 | vertexOutput.texcoord0 = vec2(0, 0); 81 | vertexOutput.position = vec4(0, 0, 0, 0); 82 | ViewRect = u_viewRect; 83 | Proj = u_proj; 84 | View = u_view; 85 | ViewTexel = u_viewTexel; 86 | InvView = u_invView; 87 | InvProj = u_invProj; 88 | ViewProj = u_viewProj; 89 | InvViewProj = u_invViewProj; 90 | PrevViewProj = u_prevViewProj; 91 | { 92 | WorldArray[0] = u_model[0]; 93 | WorldArray[1] = u_model[1]; 94 | WorldArray[2] = u_model[2]; 95 | WorldArray[3] = u_model[3]; 96 | } 97 | World = u_model[0]; 98 | WorldView = u_modelView; 99 | WorldViewProj = u_modelViewProj; 100 | PrevWorldPosOffset = u_prevWorldPosOffset; 101 | AlphaRef4 = u_alphaRef4; 102 | AlphaRef = u_alphaRef4.x; 103 | Vert(vertexInput, vertexOutput); 104 | v_texcoord0 = vertexOutput.texcoord0; 105 | gl_Position = vertexOutput.position; 106 | } 107 | 108 | -------------------------------------------------------------------------------- /materials/BlockSelectionOverlayBlockEntity/BlockSelectionOverlayBlockEntity.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec2 v_texcoord0 : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/Bloom/Bloom.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/Builtins/Builtins.varying.def.sc: -------------------------------------------------------------------------------- 1 | #ifdef DEBUGFONT_PASS 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_color1 : COLOR1; 4 | #endif 5 | vec3 a_position : POSITION; 6 | #ifdef DEBUGFONT_PASS 7 | vec2 a_texcoord0 : TEXCOORD0; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec4 v_color1 : COLOR1; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | #endif 13 | -------------------------------------------------------------------------------- /materials/CameraAimAssistHighlight/CameraAimAssistHighlight.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - ALPHA_TEST_PASS (not used) 6 | * - RASTERIZED_ALPHA_TEST_PASS (not used) 7 | * - RASTERIZED_TRANSPARENT_PASS (not used) 8 | * - TRANSPARENT_PASS (not used) 9 | */ 10 | 11 | $input a_position, a_texcoord0 12 | $output v_texcoord0 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 TextureOpacity; 34 | uniform vec4 TintColor; 35 | vec4 ViewRect; 36 | mat4 Proj; 37 | mat4 View; 38 | vec4 ViewTexel; 39 | mat4 InvView; 40 | mat4 InvProj; 41 | mat4 ViewProj; 42 | mat4 InvViewProj; 43 | mat4 PrevViewProj; 44 | mat4 WorldArray[4]; 45 | mat4 World; 46 | mat4 WorldView; 47 | mat4 WorldViewProj; 48 | vec4 PrevWorldPosOffset; 49 | vec4 AlphaRef4; 50 | float AlphaRef; 51 | struct VertexInput { 52 | vec3 position; 53 | vec2 texcoord0; 54 | }; 55 | 56 | struct VertexOutput { 57 | vec4 position; 58 | vec2 texcoord0; 59 | }; 60 | 61 | struct FragmentInput { 62 | vec2 texcoord0; 63 | }; 64 | 65 | struct FragmentOutput { 66 | vec4 Color0; 67 | }; 68 | 69 | SAMPLER2D_AUTOREG(s_MatTexture); 70 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 71 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 72 | vertOutput.texcoord0 = vertInput.texcoord0; 73 | } 74 | void main() { 75 | VertexInput vertexInput; 76 | VertexOutput vertexOutput; 77 | vertexInput.position = (a_position); 78 | vertexInput.texcoord0 = (a_texcoord0); 79 | vertexOutput.texcoord0 = vec2(0, 0); 80 | vertexOutput.position = vec4(0, 0, 0, 0); 81 | ViewRect = u_viewRect; 82 | Proj = u_proj; 83 | View = u_view; 84 | ViewTexel = u_viewTexel; 85 | InvView = u_invView; 86 | InvProj = u_invProj; 87 | ViewProj = u_viewProj; 88 | InvViewProj = u_invViewProj; 89 | PrevViewProj = u_prevViewProj; 90 | { 91 | WorldArray[0] = u_model[0]; 92 | WorldArray[1] = u_model[1]; 93 | WorldArray[2] = u_model[2]; 94 | WorldArray[3] = u_model[3]; 95 | } 96 | World = u_model[0]; 97 | WorldView = u_modelView; 98 | WorldViewProj = u_modelViewProj; 99 | PrevWorldPosOffset = u_prevWorldPosOffset; 100 | AlphaRef4 = u_alphaRef4; 101 | AlphaRef = u_alphaRef4.x; 102 | Vert(vertexInput, vertexOutput); 103 | v_texcoord0 = vertexOutput.texcoord0; 104 | gl_Position = vertexOutput.position; 105 | } 106 | 107 | -------------------------------------------------------------------------------- /materials/CameraAimAssistHighlight/CameraAimAssistHighlight.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/Checkerboarding/Checkerboarding.ESSL_310.Compute.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - DO_CHECKERBOARDING_PASS (not used) 8 | * - FALLBACK_PASS (not used) 9 | */ 10 | 11 | #extension GL_EXT_texture_cube_map_array : enable 12 | #define shadow2D(_sampler, _coord)texture(_sampler, _coord) 13 | #define shadow2DArray(_sampler, _coord)texture(_sampler, _coord) 14 | #define shadow2DProj(_sampler, _coord)textureProj(_sampler, _coord) 15 | struct NoopSampler { 16 | int noop; 17 | }; 18 | 19 | struct NoopImage2D { 20 | int noop; 21 | }; 22 | 23 | struct NoopImage3D { 24 | int noop; 25 | }; 26 | 27 | struct rayQueryKHR { 28 | int noop; 29 | }; 30 | 31 | struct accelerationStructureKHR { 32 | int noop; 33 | }; 34 | 35 | uniform vec4 OtherSideOffset; 36 | uvec3 LocalInvocationID; 37 | uint LocalInvocationIndex; 38 | uvec3 GlobalInvocationID; 39 | uvec3 WorkGroupID; 40 | struct VertexInput { 41 | float dummy; 42 | }; 43 | 44 | struct VertexOutput { 45 | vec4 position; 46 | }; 47 | 48 | struct FragmentInput { 49 | float dummy; 50 | }; 51 | 52 | struct FragmentOutput { 53 | vec4 Color0; 54 | }; 55 | 56 | layout(rgba8, binding = 0)readonly uniform highp image2D s_ColorMetalnessInput; 57 | uniform lowp sampler2D s_NormalInput; 58 | layout(rgba16f, binding = 2)readonly uniform highp image2D s_EmissiveLinearRoughnessInput; 59 | layout(r32ui, binding = 3)readonly uniform highp uimage2D s_PlaneIDInput; 60 | layout(rgba32f, binding = 4)readonly uniform highp image2D s_WorldPositionInput; 61 | layout(rgba16f, binding = 5)readonly uniform highp image2D s_LowPrecisionWorldPositionInput; 62 | layout(rgba16f, binding = 6)readonly uniform highp image2D s_ViewDirectionAndSplitMaskInput; 63 | layout(rgba8, binding = 7)writeonly uniform highp image2D s_ColorMetalnessOutput; 64 | uniform lowp sampler2D s_NormalOutput; 65 | layout(rgba16f, binding = 9)writeonly uniform highp image2D s_EmissiveLinearRoughnessOutput; 66 | layout(r32ui, binding = 10)writeonly uniform highp uimage2D s_PlaneIDOutput; 67 | layout(rgba32f, binding = 11)writeonly uniform highp image2D s_WorldPositionOutput; 68 | layout(rgba16f, binding = 12)writeonly uniform highp image2D s_LowPrecisionWorldPositionOutput; 69 | layout(rgba16f, binding = 13)writeonly uniform highp image2D s_ViewDirectionAndSplitMaskOutput; 70 | void Checkerboarding() { 71 | } 72 | 73 | layout(local_size_x = 8, local_size_y = 8, local_size_z = 1)in; 74 | void main() { 75 | LocalInvocationID = gl_LocalInvocationID; 76 | LocalInvocationIndex = gl_LocalInvocationIndex; 77 | GlobalInvocationID = gl_GlobalInvocationID; 78 | WorkGroupID = gl_WorkGroupID; 79 | Checkerboarding(); 80 | } 81 | 82 | -------------------------------------------------------------------------------- /materials/Checkerboarding/Checkerboarding.ESSL_310.Compute.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - DO_CHECKERBOARDING_PASS (not used) 6 | * - FALLBACK_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 OtherSideOffset; 30 | uvec3 LocalInvocationID; 31 | uint LocalInvocationIndex; 32 | uvec3 GlobalInvocationID; 33 | uvec3 WorkGroupID; 34 | struct VertexInput { 35 | float dummy; 36 | }; 37 | 38 | struct VertexOutput { 39 | vec4 position; 40 | }; 41 | 42 | struct FragmentInput { 43 | float dummy; 44 | }; 45 | 46 | struct FragmentOutput { 47 | vec4 Color0; 48 | }; 49 | 50 | IMAGE2D_RO_AUTOREG(s_ColorMetalnessInput, rgba8); 51 | SAMPLER2D_AUTOREG(s_NormalInput); 52 | IMAGE2D_RO_AUTOREG(s_EmissiveLinearRoughnessInput, rgba16f); 53 | UIMAGE2D_RO_AUTOREG(s_PlaneIDInput, r32ui); 54 | IMAGE2D_RO_AUTOREG(s_WorldPositionInput, rgba32f); 55 | IMAGE2D_RO_AUTOREG(s_LowPrecisionWorldPositionInput, rgba16f); 56 | IMAGE2D_RO_AUTOREG(s_ViewDirectionAndSplitMaskInput, rgba16f); 57 | IMAGE2D_WR_AUTOREG(s_ColorMetalnessOutput, rgba8); 58 | SAMPLER2D_AUTOREG(s_NormalOutput); 59 | IMAGE2D_WR_AUTOREG(s_EmissiveLinearRoughnessOutput, rgba16f); 60 | UIMAGE2D_WR_AUTOREG(s_PlaneIDOutput, r32ui); 61 | IMAGE2D_WR_AUTOREG(s_WorldPositionOutput, rgba32f); 62 | IMAGE2D_WR_AUTOREG(s_LowPrecisionWorldPositionOutput, rgba16f); 63 | IMAGE2D_WR_AUTOREG(s_ViewDirectionAndSplitMaskOutput, rgba16f); 64 | void Checkerboarding() { 65 | } 66 | 67 | NUM_THREADS(8, 8, 1) 68 | void main() { 69 | LocalInvocationID = gl_LocalInvocationID; 70 | LocalInvocationIndex = gl_LocalInvocationIndex; 71 | GlobalInvocationID = gl_GlobalInvocationID; 72 | WorkGroupID = gl_WorkGroupID; 73 | Checkerboarding(); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /materials/ClearVolume/ClearVolume.ESSL_310.Compute.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - CLEAR_PASS (not used) 8 | * - FALLBACK_PASS (not used) 9 | */ 10 | 11 | #extension GL_EXT_texture_cube_map_array : enable 12 | #define shadow2D(_sampler, _coord)texture(_sampler, _coord) 13 | #define shadow2DArray(_sampler, _coord)texture(_sampler, _coord) 14 | #define shadow2DProj(_sampler, _coord)textureProj(_sampler, _coord) 15 | struct NoopSampler { 16 | int noop; 17 | }; 18 | 19 | struct NoopImage2D { 20 | int noop; 21 | }; 22 | 23 | struct NoopImage3D { 24 | int noop; 25 | }; 26 | 27 | struct rayQueryKHR { 28 | int noop; 29 | }; 30 | 31 | struct accelerationStructureKHR { 32 | int noop; 33 | }; 34 | 35 | uniform vec4 ClearValue; 36 | uniform vec4 VolumeDimensions; 37 | uvec3 LocalInvocationID; 38 | uint LocalInvocationIndex; 39 | uvec3 GlobalInvocationID; 40 | uvec3 WorkGroupID; 41 | struct VertexInput { 42 | float dummy; 43 | }; 44 | 45 | struct VertexOutput { 46 | vec4 position; 47 | }; 48 | 49 | struct FragmentInput { 50 | float dummy; 51 | }; 52 | 53 | struct FragmentOutput { 54 | vec4 Color0; 55 | }; 56 | 57 | layout(rgba16f, binding = 0)writeonly uniform highp image2DArray s_Volume; 58 | void Clear() { 59 | int volumeWidth = int(VolumeDimensions.x); 60 | int volumeHeight = int(VolumeDimensions.y); 61 | int volumeDepth = int(VolumeDimensions.z); 62 | int x = int(GlobalInvocationID.x); 63 | int y = int(GlobalInvocationID.y); 64 | int z = int(GlobalInvocationID.z); 65 | if (x >= volumeWidth || y >= volumeHeight || z >= volumeDepth) { 66 | return; 67 | } 68 | imageStore(s_Volume, ivec3(x, y, z), ClearValue); 69 | } 70 | 71 | layout(local_size_x = 8, local_size_y = 8, local_size_z = 8)in; 72 | void main() { 73 | LocalInvocationID = gl_LocalInvocationID; 74 | LocalInvocationIndex = gl_LocalInvocationIndex; 75 | GlobalInvocationID = gl_GlobalInvocationID; 76 | WorkGroupID = gl_WorkGroupID; 77 | Clear(); 78 | } 79 | 80 | -------------------------------------------------------------------------------- /materials/ClearVolume/ClearVolume.ESSL_310.Compute.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - CLEAR_PASS (not used) 6 | * - FALLBACK_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 ClearValue; 30 | uniform vec4 VolumeDimensions; 31 | uvec3 LocalInvocationID; 32 | uint LocalInvocationIndex; 33 | uvec3 GlobalInvocationID; 34 | uvec3 WorkGroupID; 35 | struct VertexInput { 36 | float dummy; 37 | }; 38 | 39 | struct VertexOutput { 40 | vec4 position; 41 | }; 42 | 43 | struct FragmentInput { 44 | float dummy; 45 | }; 46 | 47 | struct FragmentOutput { 48 | vec4 Color0; 49 | }; 50 | 51 | IMAGE2D_ARRAY_WR_AUTOREG(s_Volume, rgba16f); 52 | void Clear() { 53 | int volumeWidth = int(VolumeDimensions.x); 54 | int volumeHeight = int(VolumeDimensions.y); 55 | int volumeDepth = int(VolumeDimensions.z); 56 | int x = int(GlobalInvocationID.x); 57 | int y = int(GlobalInvocationID.y); 58 | int z = int(GlobalInvocationID.z); 59 | if (x >= volumeWidth || y >= volumeHeight || z >= volumeDepth) { 60 | return; 61 | } 62 | imageStore(s_Volume, ivec3(x, y, z), ClearValue); 63 | } 64 | 65 | NUM_THREADS(8, 8, 8) 66 | void main() { 67 | LocalInvocationID = gl_LocalInvocationID; 68 | LocalInvocationIndex = gl_LocalInvocationIndex; 69 | GlobalInvocationID = gl_GlobalInvocationID; 70 | WorkGroupID = gl_WorkGroupID; 71 | Clear(); 72 | } 73 | 74 | -------------------------------------------------------------------------------- /materials/ClearVolume/ClearVolume.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - CLEAR_PASS (not used) 6 | * - FALLBACK_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 ClearValue; 30 | uniform vec4 VolumeDimensions; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | float dummy; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | IMAGE2D_ARRAY_WR_AUTOREG(s_Volume, rgba16f); 64 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 65 | fragOutput.Color0 = vec4(0.0, 0.0, 0.0, 0.0); 66 | } 67 | void main() { 68 | FragmentInput fragmentInput; 69 | FragmentOutput fragmentOutput; 70 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Frag(fragmentInput, fragmentOutput); 93 | gl_FragColor = fragmentOutput.Color0; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/ClearVolume/ClearVolume.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - CLEAR_PASS (not used) 8 | * - FALLBACK_PASS (not used) 9 | */ 10 | 11 | #define attribute in 12 | #define varying out 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 u_viewRect; 34 | uniform mat4 u_proj; 35 | uniform mat4 u_view; 36 | uniform vec4 u_viewTexel; 37 | uniform mat4 u_invView; 38 | uniform vec4 ClearValue; 39 | uniform mat4 u_invProj; 40 | uniform mat4 u_viewProj; 41 | uniform mat4 u_invViewProj; 42 | uniform mat4 u_prevViewProj; 43 | uniform mat4 u_model[4]; 44 | uniform mat4 u_modelView; 45 | uniform mat4 u_modelViewProj; 46 | uniform vec4 u_prevWorldPosOffset; 47 | uniform vec4 u_alphaRef4; 48 | uniform vec4 VolumeDimensions; 49 | vec4 ViewRect; 50 | mat4 Proj; 51 | mat4 View; 52 | vec4 ViewTexel; 53 | mat4 InvView; 54 | mat4 InvProj; 55 | mat4 ViewProj; 56 | mat4 InvViewProj; 57 | mat4 PrevViewProj; 58 | mat4 WorldArray[4]; 59 | mat4 World; 60 | mat4 WorldView; 61 | mat4 WorldViewProj; 62 | vec4 PrevWorldPosOffset; 63 | vec4 AlphaRef4; 64 | float AlphaRef; 65 | struct VertexInput { 66 | float dummy; 67 | }; 68 | 69 | struct VertexOutput { 70 | vec4 position; 71 | }; 72 | 73 | struct FragmentInput { 74 | float dummy; 75 | }; 76 | 77 | struct FragmentOutput { 78 | vec4 Color0; 79 | }; 80 | 81 | layout(rgba16f, binding = 0)writeonly uniform highp image2DArray s_Volume; 82 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 83 | } 84 | void main() { 85 | VertexInput vertexInput; 86 | VertexOutput vertexOutput; 87 | vertexOutput.position = vec4(0, 0, 0, 0); 88 | ViewRect = u_viewRect; 89 | Proj = u_proj; 90 | View = u_view; 91 | ViewTexel = u_viewTexel; 92 | InvView = u_invView; 93 | InvProj = u_invProj; 94 | ViewProj = u_viewProj; 95 | InvViewProj = u_invViewProj; 96 | PrevViewProj = u_prevViewProj; 97 | { 98 | WorldArray[0] = u_model[0]; 99 | WorldArray[1] = u_model[1]; 100 | WorldArray[2] = u_model[2]; 101 | WorldArray[3] = u_model[3]; 102 | } 103 | World = u_model[0]; 104 | WorldView = u_modelView; 105 | WorldViewProj = u_modelViewProj; 106 | PrevWorldPosOffset = u_prevWorldPosOffset; 107 | AlphaRef4 = u_alphaRef4; 108 | AlphaRef = u_alphaRef4.x; 109 | Vert(vertexInput, vertexOutput); 110 | gl_Position = vertexOutput.position; 111 | } 112 | 113 | -------------------------------------------------------------------------------- /materials/ClearVolume/ClearVolume.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - CLEAR_PASS (not used) 6 | * - FALLBACK_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 ClearValue; 30 | uniform vec4 VolumeDimensions; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | float dummy; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | IMAGE2D_ARRAY_WR_AUTOREG(s_Volume, rgba16f); 64 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 65 | } 66 | void main() { 67 | VertexInput vertexInput; 68 | VertexOutput vertexOutput; 69 | vertexOutput.position = vec4(0, 0, 0, 0); 70 | ViewRect = u_viewRect; 71 | Proj = u_proj; 72 | View = u_view; 73 | ViewTexel = u_viewTexel; 74 | InvView = u_invView; 75 | InvProj = u_invProj; 76 | ViewProj = u_viewProj; 77 | InvViewProj = u_invViewProj; 78 | PrevViewProj = u_prevViewProj; 79 | { 80 | WorldArray[0] = u_model[0]; 81 | WorldArray[1] = u_model[1]; 82 | WorldArray[2] = u_model[2]; 83 | WorldArray[3] = u_model[3]; 84 | } 85 | World = u_model[0]; 86 | WorldView = u_modelView; 87 | WorldViewProj = u_modelViewProj; 88 | PrevWorldPosOffset = u_prevWorldPosOffset; 89 | AlphaRef4 = u_alphaRef4; 90 | AlphaRef = u_alphaRef4.x; 91 | Vert(vertexInput, vertexOutput); 92 | gl_Position = vertexOutput.position; 93 | } 94 | 95 | -------------------------------------------------------------------------------- /materials/Clouds/Clouds.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec2 v_texcoord0 : TEXCOORD0; 11 | vec3 v_worldPos : TEXCOORD3; 12 | -------------------------------------------------------------------------------- /materials/CloudsForwardPBR/CloudsForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec3 v_ndcPosition : COLOR1; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_worldPos : TEXCOORD3; 13 | -------------------------------------------------------------------------------- /materials/Color/Color.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 i_data1 : TEXCOORD7; 7 | vec4 i_data2 : TEXCOORD6; 8 | vec4 i_data3 : TEXCOORD5; 9 | 10 | vec4 v_color0 : COLOR0; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_viewSpaceNormal : NORMAL; 13 | vec3 v_worldPos : TEXCOORD3; 14 | -------------------------------------------------------------------------------- /materials/ColorPostProcessing/ColorPostProcessing.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/Cracks/Cracks.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/CracksBlockEntity/CracksBlockEntity.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec2 v_texcoord0 : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/Cubemap/Cubemap.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | 3 | vec3 v_texcoord0 : TEXCOORD0; 4 | -------------------------------------------------------------------------------- /materials/CubemapHDRi/CubemapHDRi.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | 3 | vec3 v_texcoord0 : TEXCOORD0; 4 | -------------------------------------------------------------------------------- /materials/CubemapTransfer/CubemapTransfer.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texCoord : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/DeferredShading/DeferredShading.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec3 v_projPosition : COLOR1; 5 | vec2 v_texcoord0 : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/EditorBlockVolumeHull/EditorBlockVolumeHull.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - OPAQUE_PASS (not used) 6 | * - RASTERIZED_OPAQUE_PASS (not used) 7 | * - RASTERIZED_TRANSPARENT_PASS (not used) 8 | * - TRANSPARENT_PASS (not used) 9 | */ 10 | 11 | $input v_normal, v_texcoord0 12 | struct NoopSampler { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage2D { 17 | int noop; 18 | }; 19 | 20 | struct NoopImage3D { 21 | int noop; 22 | }; 23 | 24 | struct rayQueryKHR { 25 | int noop; 26 | }; 27 | 28 | struct accelerationStructureKHR { 29 | int noop; 30 | }; 31 | 32 | uniform vec4 CameraDirection; 33 | uniform vec4 MatColor; 34 | vec4 ViewRect; 35 | mat4 Proj; 36 | mat4 View; 37 | vec4 ViewTexel; 38 | mat4 InvView; 39 | mat4 InvProj; 40 | mat4 ViewProj; 41 | mat4 InvViewProj; 42 | mat4 PrevViewProj; 43 | mat4 WorldArray[4]; 44 | mat4 World; 45 | mat4 WorldView; 46 | mat4 WorldViewProj; 47 | vec4 PrevWorldPosOffset; 48 | vec4 AlphaRef4; 49 | float AlphaRef; 50 | struct VertexInput { 51 | vec3 normal; 52 | vec3 position; 53 | vec2 texcoord0; 54 | }; 55 | 56 | struct VertexOutput { 57 | vec4 position; 58 | vec3 normal; 59 | vec2 texcoord0; 60 | }; 61 | 62 | struct FragmentInput { 63 | vec3 normal; 64 | vec2 texcoord0; 65 | }; 66 | 67 | struct FragmentOutput { 68 | vec4 Color0; 69 | }; 70 | 71 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 72 | fragOutput.Color0 = MatColor; 73 | } 74 | void main() { 75 | FragmentInput fragmentInput; 76 | FragmentOutput fragmentOutput; 77 | fragmentInput.normal = v_normal; 78 | fragmentInput.texcoord0 = v_texcoord0; 79 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 80 | ViewRect = u_viewRect; 81 | Proj = u_proj; 82 | View = u_view; 83 | ViewTexel = u_viewTexel; 84 | InvView = u_invView; 85 | InvProj = u_invProj; 86 | ViewProj = u_viewProj; 87 | InvViewProj = u_invViewProj; 88 | PrevViewProj = u_prevViewProj; 89 | { 90 | WorldArray[0] = u_model[0]; 91 | WorldArray[1] = u_model[1]; 92 | WorldArray[2] = u_model[2]; 93 | WorldArray[3] = u_model[3]; 94 | } 95 | World = u_model[0]; 96 | WorldView = u_modelView; 97 | WorldViewProj = u_modelViewProj; 98 | PrevWorldPosOffset = u_prevWorldPosOffset; 99 | AlphaRef4 = u_alphaRef4; 100 | AlphaRef = u_alphaRef4.x; 101 | Frag(fragmentInput, fragmentOutput); 102 | gl_FragColor = fragmentOutput.Color0; 103 | } 104 | 105 | -------------------------------------------------------------------------------- /materials/EditorBlockVolumeHull/EditorBlockVolumeHull.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_normal : NORMAL; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec3 v_normal : NORMAL; 6 | vec2 v_texcoord0 : TEXCOORD0; 7 | -------------------------------------------------------------------------------- /materials/EditorBlockVolumeWireframe/EditorBlockVolumeWireframe.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - ALPHA_TEST_PASS (not used) 6 | * - RASTERIZED_ALPHA_TEST_PASS (not used) 7 | * - RASTERIZED_TRANSPARENT_PASS (not used) 8 | * - TRANSPARENT_PASS (not used) 9 | */ 10 | 11 | $input a_position, a_texcoord0 12 | $output v_texcoord0 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 FrameTime; 34 | uniform vec4 MatColor; 35 | vec4 ViewRect; 36 | mat4 Proj; 37 | mat4 View; 38 | vec4 ViewTexel; 39 | mat4 InvView; 40 | mat4 InvProj; 41 | mat4 ViewProj; 42 | mat4 InvViewProj; 43 | mat4 PrevViewProj; 44 | mat4 WorldArray[4]; 45 | mat4 World; 46 | mat4 WorldView; 47 | mat4 WorldViewProj; 48 | vec4 PrevWorldPosOffset; 49 | vec4 AlphaRef4; 50 | float AlphaRef; 51 | struct VertexInput { 52 | vec3 position; 53 | vec2 texcoord0; 54 | }; 55 | 56 | struct VertexOutput { 57 | vec4 position; 58 | vec2 texcoord0; 59 | }; 60 | 61 | struct FragmentInput { 62 | vec2 texcoord0; 63 | }; 64 | 65 | struct FragmentOutput { 66 | vec4 Color0; 67 | }; 68 | 69 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 70 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 71 | vertOutput.texcoord0 = vertInput.texcoord0; 72 | } 73 | void main() { 74 | VertexInput vertexInput; 75 | VertexOutput vertexOutput; 76 | vertexInput.position = (a_position); 77 | vertexInput.texcoord0 = (a_texcoord0); 78 | vertexOutput.texcoord0 = vec2(0, 0); 79 | vertexOutput.position = vec4(0, 0, 0, 0); 80 | ViewRect = u_viewRect; 81 | Proj = u_proj; 82 | View = u_view; 83 | ViewTexel = u_viewTexel; 84 | InvView = u_invView; 85 | InvProj = u_invProj; 86 | ViewProj = u_viewProj; 87 | InvViewProj = u_invViewProj; 88 | PrevViewProj = u_prevViewProj; 89 | { 90 | WorldArray[0] = u_model[0]; 91 | WorldArray[1] = u_model[1]; 92 | WorldArray[2] = u_model[2]; 93 | WorldArray[3] = u_model[3]; 94 | } 95 | World = u_model[0]; 96 | WorldView = u_modelView; 97 | WorldViewProj = u_modelViewProj; 98 | PrevWorldPosOffset = u_prevWorldPosOffset; 99 | AlphaRef4 = u_alphaRef4; 100 | AlphaRef = u_alphaRef4.x; 101 | Vert(vertexInput, vertexOutput); 102 | v_texcoord0 = vertexOutput.texcoord0; 103 | gl_Position = vertexOutput.position; 104 | } 105 | 106 | -------------------------------------------------------------------------------- /materials/EditorBlockVolumeWireframe/EditorBlockVolumeWireframe.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/EditorHighlight/EditorHighlight.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - HIGHLIGHT_PASS (not used) 6 | * - HIGHLIGHT_TEXTURE_EDGE_PASS (not used) 7 | */ 8 | 9 | $input v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 HighlightColor; 31 | uniform vec4 HighlightAlpha; 32 | uniform vec4 HiddenBlocksAlpha; 33 | uniform vec4 CameraPosition; 34 | uniform vec4 BlockEdgeColor; 35 | uniform vec4 BlockEdgeThickness; 36 | uniform mat4 InverseProjView; 37 | uniform vec4 OutlineColor; 38 | uniform vec4 OutlineWidth; 39 | uniform vec4 OverlayTextureStretch; 40 | uniform vec4 ScreenSize; 41 | vec4 ViewRect; 42 | mat4 Proj; 43 | mat4 View; 44 | vec4 ViewTexel; 45 | mat4 InvView; 46 | mat4 InvProj; 47 | mat4 ViewProj; 48 | mat4 InvViewProj; 49 | mat4 PrevViewProj; 50 | mat4 WorldArray[4]; 51 | mat4 World; 52 | mat4 WorldView; 53 | mat4 WorldViewProj; 54 | vec4 PrevWorldPosOffset; 55 | vec4 AlphaRef4; 56 | float AlphaRef; 57 | struct VertexInput { 58 | vec3 position; 59 | vec2 texcoord0; 60 | }; 61 | 62 | struct VertexOutput { 63 | vec4 position; 64 | vec2 texcoord0; 65 | }; 66 | 67 | struct FragmentInput { 68 | vec2 texcoord0; 69 | }; 70 | 71 | struct FragmentOutput { 72 | vec4 Color0; 73 | }; 74 | 75 | SAMPLER2D_AUTOREG(s_HighlightTextureColor); 76 | SAMPLER2D_AUTOREG(s_HighlightTextureDepth); 77 | SAMPLER2D_AUTOREG(s_SceneTextureColor); 78 | SAMPLER2D_AUTOREG(s_SceneTextureDepth); 79 | SAMPLER2D_AUTOREG(s_SelectedBlocksOverlayTexture); 80 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 81 | } 82 | void main() { 83 | FragmentInput fragmentInput; 84 | FragmentOutput fragmentOutput; 85 | fragmentInput.texcoord0 = v_texcoord0; 86 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 87 | ViewRect = u_viewRect; 88 | Proj = u_proj; 89 | View = u_view; 90 | ViewTexel = u_viewTexel; 91 | InvView = u_invView; 92 | InvProj = u_invProj; 93 | ViewProj = u_viewProj; 94 | InvViewProj = u_invViewProj; 95 | PrevViewProj = u_prevViewProj; 96 | { 97 | WorldArray[0] = u_model[0]; 98 | WorldArray[1] = u_model[1]; 99 | WorldArray[2] = u_model[2]; 100 | WorldArray[3] = u_model[3]; 101 | } 102 | World = u_model[0]; 103 | WorldView = u_modelView; 104 | WorldViewProj = u_modelViewProj; 105 | PrevWorldPosOffset = u_prevWorldPosOffset; 106 | AlphaRef4 = u_alphaRef4; 107 | AlphaRef = u_alphaRef4.x; 108 | Frag(fragmentInput, fragmentOutput); 109 | gl_FragColor = fragmentOutput.Color0; 110 | } 111 | 112 | -------------------------------------------------------------------------------- /materials/EditorHighlight/EditorHighlight.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/EditorSelectionCursor/EditorSelectionCursor.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - ALPHA_TEST_PASS (not used) 6 | * - RASTERIZED_ALPHA_TEST_PASS (not used) 7 | * - RASTERIZED_TRANSPARENT_PASS (not used) 8 | * - TRANSPARENT_PASS (not used) 9 | */ 10 | 11 | $input a_position 12 | $output v_w 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 FrameTime; 34 | uniform vec4 MatColor; 35 | vec4 ViewRect; 36 | mat4 Proj; 37 | mat4 View; 38 | vec4 ViewTexel; 39 | mat4 InvView; 40 | mat4 InvProj; 41 | mat4 ViewProj; 42 | mat4 InvViewProj; 43 | mat4 PrevViewProj; 44 | mat4 WorldArray[4]; 45 | mat4 World; 46 | mat4 WorldView; 47 | mat4 WorldViewProj; 48 | vec4 PrevWorldPosOffset; 49 | vec4 AlphaRef4; 50 | float AlphaRef; 51 | struct VertexInput { 52 | vec4 position; 53 | }; 54 | 55 | struct VertexOutput { 56 | vec4 position; 57 | float w; 58 | }; 59 | 60 | struct FragmentInput { 61 | float w; 62 | }; 63 | 64 | struct FragmentOutput { 65 | vec4 Color0; 66 | }; 67 | 68 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 69 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position.xyz, 1.0))); // Attention! 70 | vertOutput.w = vertInput.position.w + (FrameTime.x * 0.5); 71 | } 72 | void main() { 73 | VertexInput vertexInput; 74 | VertexOutput vertexOutput; 75 | vertexInput.position = (a_position); 76 | vertexOutput.w = 0.0; 77 | vertexOutput.position = vec4(0, 0, 0, 0); 78 | ViewRect = u_viewRect; 79 | Proj = u_proj; 80 | View = u_view; 81 | ViewTexel = u_viewTexel; 82 | InvView = u_invView; 83 | InvProj = u_invProj; 84 | ViewProj = u_viewProj; 85 | InvViewProj = u_invViewProj; 86 | PrevViewProj = u_prevViewProj; 87 | { 88 | WorldArray[0] = u_model[0]; 89 | WorldArray[1] = u_model[1]; 90 | WorldArray[2] = u_model[2]; 91 | WorldArray[3] = u_model[3]; 92 | } 93 | World = u_model[0]; 94 | WorldView = u_modelView; 95 | WorldViewProj = u_modelViewProj; 96 | PrevWorldPosOffset = u_prevWorldPosOffset; 97 | AlphaRef4 = u_alphaRef4; 98 | AlphaRef = u_alphaRef4.x; 99 | Vert(vertexInput, vertexOutput); 100 | v_w = vertexOutput.w; 101 | gl_Position = vertexOutput.position; 102 | } 103 | 104 | -------------------------------------------------------------------------------- /materials/EditorSelectionCursor/EditorSelectionCursor.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | 3 | float v_w : TEXCOORD0; 4 | -------------------------------------------------------------------------------- /materials/EndPortal/EndPortal.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | centroid vec2 v_colorUV : TEXCOORD0; 10 | float v_encodedPlane : TEXCOORD2; 11 | vec4 v_fog : COLOR0; 12 | centroid vec2 v_parallaxUV : TEXCOORD1; 13 | -------------------------------------------------------------------------------- /materials/EndPortalForwardPBR/EndPortalForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | centroid vec2 v_colorUV : TEXCOORD0; 10 | float v_encodedPlane : TEXCOORD2; 11 | vec4 v_fog : COLOR0; 12 | centroid vec2 v_parallaxUV : TEXCOORD1; 13 | -------------------------------------------------------------------------------- /materials/EndSky/EndSky.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec2 v_texcoord0 : TEXCOORD0; 11 | vec3 v_worldPos : TEXCOORD3; 12 | -------------------------------------------------------------------------------- /materials/Entity/Entity.varying.def.sc: -------------------------------------------------------------------------------- 1 | int a_indices : BLENDINDICES; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 v_fog : COLOR2; 7 | vec4 v_layerUv : TEXCOORD2; 8 | vec4 v_light : COLOR3; 9 | vec2 v_texcoord0 : TEXCOORD0; 10 | -------------------------------------------------------------------------------- /materials/FlameBillboard/FlameBillboard.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec4 v_fog : COLOR0; 5 | vec2 v_texcoord0 : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/Flipbook/Flipbook.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - BLIT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0, v_texcoord1 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 VBlendControl; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | vec2 texcoord0; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | vec2 texcoord0; 55 | vec2 texcoord1; 56 | }; 57 | 58 | struct FragmentInput { 59 | vec2 texcoord0; 60 | vec2 texcoord1; 61 | }; 62 | 63 | struct FragmentOutput { 64 | vec4 Color0; 65 | }; 66 | 67 | SAMPLER2D_AUTOREG(s_BlitTexture); 68 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 69 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 70 | vertOutput.texcoord0 = vertInput.texcoord0; 71 | vertOutput.texcoord0.y += VBlendControl.x; 72 | vertOutput.texcoord1 = vertInput.texcoord0; 73 | vertOutput.texcoord1.y += VBlendControl.y; 74 | } 75 | void main() { 76 | VertexInput vertexInput; 77 | VertexOutput vertexOutput; 78 | vertexInput.position = (a_position); 79 | vertexInput.texcoord0 = (a_texcoord0); 80 | vertexOutput.texcoord0 = vec2(0, 0); 81 | vertexOutput.texcoord1 = vec2(0, 0); 82 | vertexOutput.position = vec4(0, 0, 0, 0); 83 | ViewRect = u_viewRect; 84 | Proj = u_proj; 85 | View = u_view; 86 | ViewTexel = u_viewTexel; 87 | InvView = u_invView; 88 | InvProj = u_invProj; 89 | ViewProj = u_viewProj; 90 | InvViewProj = u_invViewProj; 91 | PrevViewProj = u_prevViewProj; 92 | { 93 | WorldArray[0] = u_model[0]; 94 | WorldArray[1] = u_model[1]; 95 | WorldArray[2] = u_model[2]; 96 | WorldArray[3] = u_model[3]; 97 | } 98 | World = u_model[0]; 99 | WorldView = u_modelView; 100 | WorldViewProj = u_modelViewProj; 101 | PrevWorldPosOffset = u_prevWorldPosOffset; 102 | AlphaRef4 = u_alphaRef4; 103 | AlphaRef = u_alphaRef4.x; 104 | Vert(vertexInput, vertexOutput); 105 | v_texcoord0 = vertexOutput.texcoord0; 106 | v_texcoord1 = vertexOutput.texcoord1; 107 | gl_Position = vertexOutput.position; 108 | } 109 | 110 | -------------------------------------------------------------------------------- /materials/Flipbook/Flipbook.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | vec2 v_texcoord1 : TEXCOORD1; 6 | -------------------------------------------------------------------------------- /materials/FloatingPointClear/FloatingPointClear.ESSL_310.Fragment.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - CLEAR_PASS (not used) 8 | */ 9 | 10 | #if GL_FRAGMENT_PRECISION_HIGH 11 | precision highp float; 12 | #else 13 | precision mediump float; 14 | #endif 15 | #define attribute in 16 | #define varying in 17 | out vec4 bgfx_FragColor; 18 | struct NoopSampler { 19 | int noop; 20 | }; 21 | 22 | struct NoopImage2D { 23 | int noop; 24 | }; 25 | 26 | struct NoopImage3D { 27 | int noop; 28 | }; 29 | 30 | struct rayQueryKHR { 31 | int noop; 32 | }; 33 | 34 | struct accelerationStructureKHR { 35 | int noop; 36 | }; 37 | 38 | uniform vec4 u_viewRect; 39 | uniform mat4 u_proj; 40 | uniform mat4 u_view; 41 | uniform vec4 u_viewTexel; 42 | uniform mat4 u_invView; 43 | uniform mat4 u_invProj; 44 | uniform mat4 u_viewProj; 45 | uniform mat4 u_invViewProj; 46 | uniform mat4 u_prevViewProj; 47 | uniform mat4 u_model[4]; 48 | uniform mat4 u_modelView; 49 | uniform mat4 u_modelViewProj; 50 | uniform vec4 u_prevWorldPosOffset; 51 | uniform vec4 u_alphaRef4; 52 | uniform vec4 ClearColor; 53 | vec4 ViewRect; 54 | mat4 Proj; 55 | mat4 View; 56 | vec4 ViewTexel; 57 | mat4 InvView; 58 | mat4 InvProj; 59 | mat4 ViewProj; 60 | mat4 InvViewProj; 61 | mat4 PrevViewProj; 62 | mat4 WorldArray[4]; 63 | mat4 World; 64 | mat4 WorldView; 65 | mat4 WorldViewProj; 66 | vec4 PrevWorldPosOffset; 67 | vec4 AlphaRef4; 68 | float AlphaRef; 69 | struct VertexInput { 70 | vec3 position; 71 | }; 72 | 73 | struct VertexOutput { 74 | vec4 position; 75 | }; 76 | 77 | struct FragmentInput { 78 | float dummy; 79 | }; 80 | 81 | struct FragmentOutput { 82 | vec4 Color0; 83 | }; 84 | 85 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 86 | fragOutput.Color0 = ClearColor; 87 | } 88 | void main() { 89 | FragmentInput fragmentInput; 90 | FragmentOutput fragmentOutput; 91 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 92 | ViewRect = u_viewRect; 93 | Proj = u_proj; 94 | View = u_view; 95 | ViewTexel = u_viewTexel; 96 | InvView = u_invView; 97 | InvProj = u_invProj; 98 | ViewProj = u_viewProj; 99 | InvViewProj = u_invViewProj; 100 | PrevViewProj = u_prevViewProj; 101 | { 102 | WorldArray[0] = u_model[0]; 103 | WorldArray[1] = u_model[1]; 104 | WorldArray[2] = u_model[2]; 105 | WorldArray[3] = u_model[3]; 106 | } 107 | World = u_model[0]; 108 | WorldView = u_modelView; 109 | WorldViewProj = u_modelViewProj; 110 | PrevWorldPosOffset = u_prevWorldPosOffset; 111 | AlphaRef4 = u_alphaRef4; 112 | AlphaRef = u_alphaRef4.x; 113 | Frag(fragmentInput, fragmentOutput); 114 | bgfx_FragColor = fragmentOutput.Color0; 115 | } 116 | 117 | -------------------------------------------------------------------------------- /materials/FloatingPointClear/FloatingPointClear.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - CLEAR_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | uniform vec4 ClearColor; 29 | vec4 ViewRect; 30 | mat4 Proj; 31 | mat4 View; 32 | vec4 ViewTexel; 33 | mat4 InvView; 34 | mat4 InvProj; 35 | mat4 ViewProj; 36 | mat4 InvViewProj; 37 | mat4 PrevViewProj; 38 | mat4 WorldArray[4]; 39 | mat4 World; 40 | mat4 WorldView; 41 | mat4 WorldViewProj; 42 | vec4 PrevWorldPosOffset; 43 | vec4 AlphaRef4; 44 | float AlphaRef; 45 | struct VertexInput { 46 | vec3 position; 47 | }; 48 | 49 | struct VertexOutput { 50 | vec4 position; 51 | }; 52 | 53 | struct FragmentInput { 54 | float dummy; 55 | }; 56 | 57 | struct FragmentOutput { 58 | vec4 Color0; 59 | }; 60 | 61 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 62 | fragOutput.Color0 = ClearColor; 63 | } 64 | void main() { 65 | FragmentInput fragmentInput; 66 | FragmentOutput fragmentOutput; 67 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 68 | ViewRect = u_viewRect; 69 | Proj = u_proj; 70 | View = u_view; 71 | ViewTexel = u_viewTexel; 72 | InvView = u_invView; 73 | InvProj = u_invProj; 74 | ViewProj = u_viewProj; 75 | InvViewProj = u_invViewProj; 76 | PrevViewProj = u_prevViewProj; 77 | { 78 | WorldArray[0] = u_model[0]; 79 | WorldArray[1] = u_model[1]; 80 | WorldArray[2] = u_model[2]; 81 | WorldArray[3] = u_model[3]; 82 | } 83 | World = u_model[0]; 84 | WorldView = u_modelView; 85 | WorldViewProj = u_modelViewProj; 86 | PrevWorldPosOffset = u_prevWorldPosOffset; 87 | AlphaRef4 = u_alphaRef4; 88 | AlphaRef = u_alphaRef4.x; 89 | Frag(fragmentInput, fragmentOutput); 90 | gl_FragColor = fragmentOutput.Color0; 91 | } 92 | 93 | -------------------------------------------------------------------------------- /materials/FloatingPointClear/FloatingPointClear.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - CLEAR_PASS (not used) 8 | */ 9 | 10 | #define attribute in 11 | #define varying out 12 | attribute vec3 a_position; 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 u_viewRect; 34 | uniform mat4 u_proj; 35 | uniform mat4 u_view; 36 | uniform vec4 u_viewTexel; 37 | uniform mat4 u_invView; 38 | uniform mat4 u_invProj; 39 | uniform mat4 u_viewProj; 40 | uniform mat4 u_invViewProj; 41 | uniform mat4 u_prevViewProj; 42 | uniform mat4 u_model[4]; 43 | uniform mat4 u_modelView; 44 | uniform mat4 u_modelViewProj; 45 | uniform vec4 u_prevWorldPosOffset; 46 | uniform vec4 u_alphaRef4; 47 | uniform vec4 ClearColor; 48 | vec4 ViewRect; 49 | mat4 Proj; 50 | mat4 View; 51 | vec4 ViewTexel; 52 | mat4 InvView; 53 | mat4 InvProj; 54 | mat4 ViewProj; 55 | mat4 InvViewProj; 56 | mat4 PrevViewProj; 57 | mat4 WorldArray[4]; 58 | mat4 World; 59 | mat4 WorldView; 60 | mat4 WorldViewProj; 61 | vec4 PrevWorldPosOffset; 62 | vec4 AlphaRef4; 63 | float AlphaRef; 64 | struct VertexInput { 65 | vec3 position; 66 | }; 67 | 68 | struct VertexOutput { 69 | vec4 position; 70 | }; 71 | 72 | struct FragmentInput { 73 | float dummy; 74 | }; 75 | 76 | struct FragmentOutput { 77 | vec4 Color0; 78 | }; 79 | 80 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 81 | vertOutput.position = vec4(vertInput.position, 1.0); 82 | vertOutput.position.xy = (vec2((vertOutput.position.xy * 2.0 - 1.0).x, 1.0 - (vertOutput.position.xy * 2.0 - 1.0).y)); 83 | } 84 | void main() { 85 | VertexInput vertexInput; 86 | VertexOutput vertexOutput; 87 | vertexInput.position = (a_position); 88 | vertexOutput.position = vec4(0, 0, 0, 0); 89 | ViewRect = u_viewRect; 90 | Proj = u_proj; 91 | View = u_view; 92 | ViewTexel = u_viewTexel; 93 | InvView = u_invView; 94 | InvProj = u_invProj; 95 | ViewProj = u_viewProj; 96 | InvViewProj = u_invViewProj; 97 | PrevViewProj = u_prevViewProj; 98 | { 99 | WorldArray[0] = u_model[0]; 100 | WorldArray[1] = u_model[1]; 101 | WorldArray[2] = u_model[2]; 102 | WorldArray[3] = u_model[3]; 103 | } 104 | World = u_model[0]; 105 | WorldView = u_modelView; 106 | WorldViewProj = u_modelViewProj; 107 | PrevWorldPosOffset = u_prevWorldPosOffset; 108 | AlphaRef4 = u_alphaRef4; 109 | AlphaRef = u_alphaRef4.x; 110 | Vert(vertexInput, vertexOutput); 111 | gl_Position = vertexOutput.position; 112 | } 113 | 114 | -------------------------------------------------------------------------------- /materials/FloatingPointClear/FloatingPointClear.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - CLEAR_PASS (not used) 6 | */ 7 | 8 | $input a_position 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 ClearColor; 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | }; 53 | 54 | struct FragmentInput { 55 | float dummy; 56 | }; 57 | 58 | struct FragmentOutput { 59 | vec4 Color0; 60 | }; 61 | 62 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 63 | vertOutput.position = vec4(vertInput.position, 1.0); 64 | vertOutput.position.xy = (vec2((vertOutput.position.xy * 2.0 - 1.0).x, 1.0 - (vertOutput.position.xy * 2.0 - 1.0).y)); 65 | } 66 | void main() { 67 | VertexInput vertexInput; 68 | VertexOutput vertexOutput; 69 | vertexInput.position = (a_position); 70 | vertexOutput.position = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Vert(vertexInput, vertexOutput); 93 | gl_Position = vertexOutput.position; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/FloatingPointClear/FloatingPointClear.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | -------------------------------------------------------------------------------- /materials/GPUDebugUtils/GPUDebugUtils.ESSL_310.Compute.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - FALLBACK_PASS (not used) 8 | * - GPU_VALIDATION_PASS 9 | * - TDR_PASS 10 | */ 11 | 12 | #extension GL_EXT_texture_cube_map_array : enable 13 | #define shadow2D(_sampler, _coord)texture(_sampler, _coord) 14 | #define shadow2DArray(_sampler, _coord)texture(_sampler, _coord) 15 | #define shadow2DProj(_sampler, _coord)textureProj(_sampler, _coord) 16 | struct NoopSampler { 17 | int noop; 18 | }; 19 | 20 | struct NoopImage2D { 21 | int noop; 22 | }; 23 | 24 | struct NoopImage3D { 25 | int noop; 26 | }; 27 | 28 | struct rayQueryKHR { 29 | int noop; 30 | }; 31 | 32 | struct accelerationStructureKHR { 33 | int noop; 34 | }; 35 | 36 | uvec3 LocalInvocationID; 37 | uint LocalInvocationIndex; 38 | uvec3 GlobalInvocationID; 39 | uvec3 WorkGroupID; 40 | struct VertexInput { 41 | float dummy; 42 | }; 43 | 44 | struct VertexOutput { 45 | vec4 position; 46 | }; 47 | 48 | struct FragmentInput { 49 | float dummy; 50 | }; 51 | 52 | struct FragmentOutput { 53 | vec4 Color0; 54 | }; 55 | 56 | layout(std430, binding = 0)buffer s_FakeRWBufferBuffer { int s_FakeRWBuffer[]; }; 57 | #ifdef GPU_VALIDATION_PASS 58 | void InitiateGpuValidaitonError() { 59 | s_FakeRWBuffer[GlobalInvocationID.x] = 0; 60 | } 61 | #endif 62 | #ifdef TDR_PASS 63 | void InitiateTDR() { 64 | while(s_FakeRWBuffer[GlobalInvocationID.x] == 0) { 65 | s_FakeRWBuffer[GlobalInvocationID.x] = 0; 66 | } 67 | } 68 | #endif 69 | 70 | layout(local_size_x = 256, local_size_y = 1, local_size_z = 1)in; 71 | void main() { 72 | LocalInvocationID = gl_LocalInvocationID; 73 | LocalInvocationIndex = gl_LocalInvocationIndex; 74 | GlobalInvocationID = gl_GlobalInvocationID; 75 | WorkGroupID = gl_WorkGroupID; 76 | #ifdef GPU_VALIDATION_PASS 77 | InitiateGpuValidaitonError(); 78 | #endif 79 | #ifdef TDR_PASS 80 | InitiateTDR(); 81 | #endif 82 | } 83 | 84 | -------------------------------------------------------------------------------- /materials/GPUDebugUtils/GPUDebugUtils.ESSL_310.Compute.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - GPU_VALIDATION_PASS 7 | * - TDR_PASS 8 | */ 9 | 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uvec3 LocalInvocationID; 31 | uint LocalInvocationIndex; 32 | uvec3 GlobalInvocationID; 33 | uvec3 WorkGroupID; 34 | struct VertexInput { 35 | float dummy; 36 | }; 37 | 38 | struct VertexOutput { 39 | vec4 position; 40 | }; 41 | 42 | struct FragmentInput { 43 | float dummy; 44 | }; 45 | 46 | struct FragmentOutput { 47 | vec4 Color0; 48 | }; 49 | 50 | BUFFER_RW_AUTOREG(s_FakeRWBufferBuffer, int); 51 | #ifdef GPU_VALIDATION_PASS 52 | void InitiateGpuValidaitonError() { 53 | s_FakeRWBuffer[GlobalInvocationID.x] = 0; 54 | } 55 | #endif 56 | #ifdef TDR_PASS 57 | void InitiateTDR() { 58 | while(s_FakeRWBuffer[GlobalInvocationID.x] == 0) { 59 | s_FakeRWBuffer[GlobalInvocationID.x] = 0; 60 | } 61 | } 62 | #endif 63 | 64 | NUM_THREADS(256, 1, 1) 65 | void main() { 66 | LocalInvocationID = gl_LocalInvocationID; 67 | LocalInvocationIndex = gl_LocalInvocationIndex; 68 | GlobalInvocationID = gl_GlobalInvocationID; 69 | WorkGroupID = gl_WorkGroupID; 70 | #ifdef GPU_VALIDATION_PASS 71 | InitiateGpuValidaitonError(); 72 | #endif 73 | #ifdef TDR_PASS 74 | InitiateTDR(); 75 | #endif 76 | } 77 | 78 | -------------------------------------------------------------------------------- /materials/GPUDebugUtils/GPUDebugUtils.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - GPU_VALIDATION_PASS (not used) 7 | * - TDR_PASS (not used) 8 | */ 9 | 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | float dummy; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | }; 53 | 54 | struct FragmentInput { 55 | float dummy; 56 | }; 57 | 58 | struct FragmentOutput { 59 | vec4 Color0; 60 | }; 61 | 62 | BUFFER_RW_AUTOREG(s_FakeRWBufferBuffer, int); 63 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 64 | fragOutput.Color0 = vec4(0.0, 0.0, 0.0, 0.0); 65 | } 66 | void main() { 67 | FragmentInput fragmentInput; 68 | FragmentOutput fragmentOutput; 69 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 70 | ViewRect = u_viewRect; 71 | Proj = u_proj; 72 | View = u_view; 73 | ViewTexel = u_viewTexel; 74 | InvView = u_invView; 75 | InvProj = u_invProj; 76 | ViewProj = u_viewProj; 77 | InvViewProj = u_invViewProj; 78 | PrevViewProj = u_prevViewProj; 79 | { 80 | WorldArray[0] = u_model[0]; 81 | WorldArray[1] = u_model[1]; 82 | WorldArray[2] = u_model[2]; 83 | WorldArray[3] = u_model[3]; 84 | } 85 | World = u_model[0]; 86 | WorldView = u_modelView; 87 | WorldViewProj = u_modelViewProj; 88 | PrevWorldPosOffset = u_prevWorldPosOffset; 89 | AlphaRef4 = u_alphaRef4; 90 | AlphaRef = u_alphaRef4.x; 91 | Frag(fragmentInput, fragmentOutput); 92 | gl_FragColor = fragmentOutput.Color0; 93 | } 94 | 95 | -------------------------------------------------------------------------------- /materials/GPUDebugUtils/GPUDebugUtils.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - FALLBACK_PASS (not used) 8 | * - GPU_VALIDATION_PASS (not used) 9 | * - TDR_PASS (not used) 10 | */ 11 | 12 | #define attribute in 13 | #define varying out 14 | struct NoopSampler { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage2D { 19 | int noop; 20 | }; 21 | 22 | struct NoopImage3D { 23 | int noop; 24 | }; 25 | 26 | struct rayQueryKHR { 27 | int noop; 28 | }; 29 | 30 | struct accelerationStructureKHR { 31 | int noop; 32 | }; 33 | 34 | uniform vec4 u_viewRect; 35 | uniform mat4 u_proj; 36 | uniform mat4 u_view; 37 | uniform vec4 u_viewTexel; 38 | uniform mat4 u_invView; 39 | uniform mat4 u_invProj; 40 | uniform mat4 u_viewProj; 41 | uniform mat4 u_invViewProj; 42 | uniform mat4 u_prevViewProj; 43 | uniform mat4 u_model[4]; 44 | uniform mat4 u_modelView; 45 | uniform mat4 u_modelViewProj; 46 | uniform vec4 u_prevWorldPosOffset; 47 | uniform vec4 u_alphaRef4; 48 | vec4 ViewRect; 49 | mat4 Proj; 50 | mat4 View; 51 | vec4 ViewTexel; 52 | mat4 InvView; 53 | mat4 InvProj; 54 | mat4 ViewProj; 55 | mat4 InvViewProj; 56 | mat4 PrevViewProj; 57 | mat4 WorldArray[4]; 58 | mat4 World; 59 | mat4 WorldView; 60 | mat4 WorldViewProj; 61 | vec4 PrevWorldPosOffset; 62 | vec4 AlphaRef4; 63 | float AlphaRef; 64 | struct VertexInput { 65 | float dummy; 66 | }; 67 | 68 | struct VertexOutput { 69 | vec4 position; 70 | }; 71 | 72 | struct FragmentInput { 73 | float dummy; 74 | }; 75 | 76 | struct FragmentOutput { 77 | vec4 Color0; 78 | }; 79 | 80 | layout(std430, binding = 0)buffer s_FakeRWBufferBuffer { int s_FakeRWBuffer[]; }; 81 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 82 | } 83 | void main() { 84 | VertexInput vertexInput; 85 | VertexOutput vertexOutput; 86 | vertexOutput.position = vec4(0, 0, 0, 0); 87 | ViewRect = u_viewRect; 88 | Proj = u_proj; 89 | View = u_view; 90 | ViewTexel = u_viewTexel; 91 | InvView = u_invView; 92 | InvProj = u_invProj; 93 | ViewProj = u_viewProj; 94 | InvViewProj = u_invViewProj; 95 | PrevViewProj = u_prevViewProj; 96 | { 97 | WorldArray[0] = u_model[0]; 98 | WorldArray[1] = u_model[1]; 99 | WorldArray[2] = u_model[2]; 100 | WorldArray[3] = u_model[3]; 101 | } 102 | World = u_model[0]; 103 | WorldView = u_modelView; 104 | WorldViewProj = u_modelViewProj; 105 | PrevWorldPosOffset = u_prevWorldPosOffset; 106 | AlphaRef4 = u_alphaRef4; 107 | AlphaRef = u_alphaRef4.x; 108 | Vert(vertexInput, vertexOutput); 109 | gl_Position = vertexOutput.position; 110 | } 111 | 112 | -------------------------------------------------------------------------------- /materials/GPUDebugUtils/GPUDebugUtils.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - GPU_VALIDATION_PASS (not used) 7 | * - TDR_PASS (not used) 8 | */ 9 | 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | float dummy; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | }; 53 | 54 | struct FragmentInput { 55 | float dummy; 56 | }; 57 | 58 | struct FragmentOutput { 59 | vec4 Color0; 60 | }; 61 | 62 | BUFFER_RW_AUTOREG(s_FakeRWBufferBuffer, int); 63 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 64 | } 65 | void main() { 66 | VertexInput vertexInput; 67 | VertexOutput vertexOutput; 68 | vertexOutput.position = vec4(0, 0, 0, 0); 69 | ViewRect = u_viewRect; 70 | Proj = u_proj; 71 | View = u_view; 72 | ViewTexel = u_viewTexel; 73 | InvView = u_invView; 74 | InvProj = u_invProj; 75 | ViewProj = u_viewProj; 76 | InvViewProj = u_invViewProj; 77 | PrevViewProj = u_prevViewProj; 78 | { 79 | WorldArray[0] = u_model[0]; 80 | WorldArray[1] = u_model[1]; 81 | WorldArray[2] = u_model[2]; 82 | WorldArray[3] = u_model[3]; 83 | } 84 | World = u_model[0]; 85 | WorldView = u_modelView; 86 | WorldViewProj = u_modelViewProj; 87 | PrevWorldPosOffset = u_prevWorldPosOffset; 88 | AlphaRef4 = u_alphaRef4; 89 | AlphaRef = u_alphaRef4.x; 90 | Vert(vertexInput, vertexOutput); 91 | gl_Position = vertexOutput.position; 92 | } 93 | 94 | -------------------------------------------------------------------------------- /materials/GamefaceClearQuad/GamefaceClearQuad.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input v_color 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | vec4 ViewRect; 30 | mat4 Proj; 31 | mat4 View; 32 | vec4 ViewTexel; 33 | mat4 InvView; 34 | mat4 InvProj; 35 | mat4 ViewProj; 36 | mat4 InvViewProj; 37 | mat4 PrevViewProj; 38 | mat4 WorldArray[4]; 39 | mat4 World; 40 | mat4 WorldView; 41 | mat4 WorldViewProj; 42 | vec4 PrevWorldPosOffset; 43 | vec4 AlphaRef4; 44 | float AlphaRef; 45 | struct VertexInput { 46 | vec4 color; 47 | vec4 position; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | vec4 color; 53 | }; 54 | 55 | struct FragmentInput { 56 | vec4 color; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 64 | fragOutput.Color0 = fragInput.color; 65 | } 66 | void main() { 67 | FragmentInput fragmentInput; 68 | FragmentOutput fragmentOutput; 69 | fragmentInput.color = v_color; 70 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Frag(fragmentInput, fragmentOutput); 93 | gl_FragColor = fragmentOutput.Color0; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/GamefaceClearQuad/GamefaceClearQuad.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_color0, a_position 9 | $output v_color 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec4 color; 48 | vec4 position; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | vec4 color; 54 | }; 55 | 56 | struct FragmentInput { 57 | vec4 color; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 65 | vertOutput.position = vertInput.position; 66 | vertOutput.color = vertInput.color; 67 | } 68 | void main() { 69 | VertexInput vertexInput; 70 | VertexOutput vertexOutput; 71 | vertexInput.color = (a_color0); 72 | vertexInput.position = (a_position); 73 | vertexOutput.color = vec4(0, 0, 0, 0); 74 | vertexOutput.position = vec4(0, 0, 0, 0); 75 | ViewRect = u_viewRect; 76 | Proj = u_proj; 77 | View = u_view; 78 | ViewTexel = u_viewTexel; 79 | InvView = u_invView; 80 | InvProj = u_invProj; 81 | ViewProj = u_viewProj; 82 | InvViewProj = u_invViewProj; 83 | PrevViewProj = u_prevViewProj; 84 | { 85 | WorldArray[0] = u_model[0]; 86 | WorldArray[1] = u_model[1]; 87 | WorldArray[2] = u_model[2]; 88 | WorldArray[3] = u_model[3]; 89 | } 90 | World = u_model[0]; 91 | WorldView = u_modelView; 92 | WorldViewProj = u_modelViewProj; 93 | PrevWorldPosOffset = u_prevWorldPosOffset; 94 | AlphaRef4 = u_alphaRef4; 95 | AlphaRef = u_alphaRef4.x; 96 | Vert(vertexInput, vertexOutput); 97 | v_color = vertexOutput.color; 98 | gl_Position = vertexOutput.position; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /materials/GamefaceClearQuad/GamefaceClearQuad.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_position : POSITION; 3 | 4 | vec4 v_color : TEXCOORD1; 5 | -------------------------------------------------------------------------------- /materials/GamefacePath/GamefacePath.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec2 v_extraParams : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/GamefaceRenoir/GamefaceRenoir.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD2; 6 | vec4 v_color : TEXCOORD1; 7 | vec4 v_screenPosition : TEXCOORD0; 8 | vec4 v_varyingParam0 : TEXCOORD3; 9 | vec4 v_varyingParam1 : TEXCOORD4; 10 | -------------------------------------------------------------------------------- /materials/GamefaceStandard/GamefaceStandard.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD2; 6 | vec4 v_color : TEXCOORD1; 7 | vec3 v_screenPosition : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/GamefaceStandardBatched/GamefaceStandardBatched.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD1; 6 | vec4 v_color : TEXCOORD0; 7 | float v_shaderType : TEXCOORD2; 8 | -------------------------------------------------------------------------------- /materials/GamefaceStandardRare/GamefaceStandardRare.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD2; 6 | vec4 v_color : TEXCOORD1; 7 | vec4 v_screenPosition : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/GamefaceStencil/GamefaceStencil.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD2; 6 | vec4 v_color : TEXCOORD1; 7 | vec4 v_screenPosition : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/GamefaceStencilPath/GamefaceStencilPath.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec2 v_extraParams : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/GamefaceStencilRare/GamefaceStencilRare.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD2; 6 | vec4 v_color : TEXCOORD1; 7 | vec4 v_screenPosition : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/GamefaceTexturesWithColorMix/GamefaceTexturesWithColorMix.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_texcoord3 : TEXCOORD3; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_position : POSITION; 4 | 5 | vec4 v_additional : TEXCOORD2; 6 | vec4 v_color : TEXCOORD1; 7 | vec4 v_screenPosition : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/ImGui/ImGui.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_color0, a_position, a_texcoord0 9 | $output v_color, v_uv 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform mat4 ImGuiProj; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec4 color; 49 | vec2 position; 50 | vec2 uv; 51 | }; 52 | 53 | struct VertexOutput { 54 | vec4 position; 55 | vec4 color; 56 | vec2 uv; 57 | }; 58 | 59 | struct FragmentInput { 60 | vec4 color; 61 | vec2 uv; 62 | }; 63 | 64 | struct FragmentOutput { 65 | vec4 Color0; 66 | }; 67 | 68 | SAMPLER2D_AUTOREG(s_MatTexture); 69 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 70 | vertOutput.position = ((ImGuiProj) * (vec4(vertInput.position, 0.0, 1.0))); // Attention! 71 | vertOutput.color = vertInput.color; 72 | vertOutput.uv = vec2(vertInput.uv.x, vertInput.uv.y); 73 | } 74 | void main() { 75 | VertexInput vertexInput; 76 | VertexOutput vertexOutput; 77 | vertexInput.color = (a_color0); 78 | vertexInput.position = (a_position); 79 | vertexInput.uv = (a_texcoord0); 80 | vertexOutput.color = vec4(0, 0, 0, 0); 81 | vertexOutput.uv = vec2(0, 0); 82 | vertexOutput.position = vec4(0, 0, 0, 0); 83 | ViewRect = u_viewRect; 84 | Proj = u_proj; 85 | View = u_view; 86 | ViewTexel = u_viewTexel; 87 | InvView = u_invView; 88 | InvProj = u_invProj; 89 | ViewProj = u_viewProj; 90 | InvViewProj = u_invViewProj; 91 | PrevViewProj = u_prevViewProj; 92 | { 93 | WorldArray[0] = u_model[0]; 94 | WorldArray[1] = u_model[1]; 95 | WorldArray[2] = u_model[2]; 96 | WorldArray[3] = u_model[3]; 97 | } 98 | World = u_model[0]; 99 | WorldView = u_modelView; 100 | WorldViewProj = u_modelViewProj; 101 | PrevWorldPosOffset = u_prevWorldPosOffset; 102 | AlphaRef4 = u_alphaRef4; 103 | AlphaRef = u_alphaRef4.x; 104 | Vert(vertexInput, vertexOutput); 105 | v_color = vertexOutput.color; 106 | v_uv = vertexOutput.uv; 107 | gl_Position = vertexOutput.position; 108 | } 109 | 110 | -------------------------------------------------------------------------------- /materials/ImGui/ImGui.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec2 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 v_color : COLOR0; 6 | vec2 v_uv : TEXCOORD0; 7 | -------------------------------------------------------------------------------- /materials/ItemInHandColor/ItemInHandColor.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 i_data1 : TEXCOORD7; 7 | vec4 i_data2 : TEXCOORD6; 8 | vec4 i_data3 : TEXCOORD5; 9 | 10 | vec4 v_color0 : COLOR0; 11 | vec4 v_fog : COLOR2; 12 | vec4 v_light : COLOR1; 13 | vec2 v_texcoord0 : TEXCOORD0; 14 | vec3 v_worldPos : TEXCOORD3; 15 | -------------------------------------------------------------------------------- /materials/ItemInHandColorGlint/ItemInHandColorGlint.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord1 : TEXCOORD1; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec4 v_color0 : COLOR0; 12 | vec4 v_fog : COLOR2; 13 | vec4 v_glintUV : TEXCOORD2; 14 | vec4 v_light : COLOR1; 15 | vec2 v_texcoord0 : TEXCOORD0; 16 | vec3 v_worldPos : TEXCOORD3; 17 | -------------------------------------------------------------------------------- /materials/ItemInHandForwardPBR/ItemInHandForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord8 : TEXCOORD8; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_mers : TEXCOORD8; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ItemInHandForwardPBRGlint/ItemInHandForwardPBRGlint.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord1 : TEXCOORD1; 3 | vec4 a_texcoord8 : TEXCOORD8; 4 | vec4 a_normal : NORMAL; 5 | vec3 a_position : POSITION; 6 | vec4 a_tangent : TANGENT; 7 | vec2 a_texcoord0 : TEXCOORD0; 8 | 9 | vec4 i_data1 : TEXCOORD7; 10 | vec4 i_data2 : TEXCOORD6; 11 | vec4 i_data3 : TEXCOORD5; 12 | 13 | vec3 v_bitangent : BITANGENT; 14 | vec4 v_color0 : COLOR0; 15 | vec4 v_glintUV : TEXCOORD2; 16 | vec4 v_mers : TEXCOORD8; 17 | vec3 v_normal : NORMAL; 18 | vec3 v_prevWorldPos : TEXCOORD4; 19 | vec3 v_tangent : TANGENT; 20 | vec2 v_texcoord0 : TEXCOORD0; 21 | vec3 v_worldPos : TEXCOORD3; 22 | -------------------------------------------------------------------------------- /materials/ItemInHandForwardPBRTextured/ItemInHandForwardPBRTextured.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord8 : TEXCOORD8; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_mers : TEXCOORD8; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ItemInHandPrepass/ItemInHandPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord8 : TEXCOORD8; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_mers : TEXCOORD8; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ItemInHandPrepassGlint/ItemInHandPrepassGlint.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord1 : TEXCOORD1; 3 | vec4 a_texcoord8 : TEXCOORD8; 4 | vec4 a_normal : NORMAL; 5 | vec3 a_position : POSITION; 6 | vec4 a_tangent : TANGENT; 7 | vec2 a_texcoord0 : TEXCOORD0; 8 | 9 | vec4 i_data1 : TEXCOORD7; 10 | vec4 i_data2 : TEXCOORD6; 11 | vec4 i_data3 : TEXCOORD5; 12 | 13 | vec3 v_bitangent : BITANGENT; 14 | vec4 v_color0 : COLOR0; 15 | vec4 v_glintUV : TEXCOORD2; 16 | vec4 v_mers : TEXCOORD8; 17 | vec3 v_normal : NORMAL; 18 | vec3 v_prevWorldPos : TEXCOORD4; 19 | vec3 v_tangent : TANGENT; 20 | vec2 v_texcoord0 : TEXCOORD0; 21 | vec3 v_worldPos : TEXCOORD3; 22 | -------------------------------------------------------------------------------- /materials/ItemInHandPrepassTextured/ItemInHandPrepassTextured.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_texcoord8 : TEXCOORD8; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec4 a_tangent : TANGENT; 6 | vec2 a_texcoord0 : TEXCOORD0; 7 | 8 | vec4 i_data1 : TEXCOORD7; 9 | vec4 i_data2 : TEXCOORD6; 10 | vec4 i_data3 : TEXCOORD5; 11 | 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_mers : TEXCOORD8; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/ItemInHandTextured/ItemInHandTextured.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 i_data1 : TEXCOORD7; 7 | vec4 i_data2 : TEXCOORD6; 8 | vec4 i_data3 : TEXCOORD5; 9 | 10 | vec4 v_color0 : COLOR0; 11 | vec4 v_fog : COLOR2; 12 | vec4 v_light : COLOR1; 13 | vec2 v_texcoord0 : TEXCOORD0; 14 | vec3 v_worldPos : TEXCOORD3; 15 | -------------------------------------------------------------------------------- /materials/LegacyCubemap/LegacyCubemap.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform mat4 CubemapRotation; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | vec2 texcoord0; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | vec2 texcoord0; 55 | }; 56 | 57 | struct FragmentInput { 58 | vec2 texcoord0; 59 | }; 60 | 61 | struct FragmentOutput { 62 | vec4 Color0; 63 | }; 64 | 65 | SAMPLER2D_AUTOREG(s_MatTexture); 66 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 67 | vertOutput.position = ((WorldViewProj) * (((CubemapRotation) * (vec4(vertInput.position, 1.0))))); // Attention! 68 | vertOutput.texcoord0 = vertInput.texcoord0; 69 | } 70 | void main() { 71 | VertexInput vertexInput; 72 | VertexOutput vertexOutput; 73 | vertexInput.position = (a_position); 74 | vertexInput.texcoord0 = (a_texcoord0); 75 | vertexOutput.texcoord0 = vec2(0, 0); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | v_texcoord0 = vertexOutput.texcoord0; 100 | gl_Position = vertexOutput.position; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /materials/LegacyCubemap/LegacyCubemap.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/LegacyCubemapForwardPBR/LegacyCubemapForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_clipPosition : TEXCOORD1; 10 | vec4 v_color0 : COLOR0; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_worldPos : TEXCOORD3; 13 | -------------------------------------------------------------------------------- /materials/LuminanceHistogram/LuminanceHistogram.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - BUILD_HISTOGRAM_PASS (not used) 6 | * - CALCULATE_AVERAGE_PASS (not used) 7 | * - CLEAN_UP_PASS (not used) 8 | * - FALLBACK_PASS (not used) 9 | */ 10 | 11 | struct NoopSampler { 12 | int noop; 13 | }; 14 | 15 | struct NoopImage2D { 16 | int noop; 17 | }; 18 | 19 | struct NoopImage3D { 20 | int noop; 21 | }; 22 | 23 | struct rayQueryKHR { 24 | int noop; 25 | }; 26 | 27 | struct accelerationStructureKHR { 28 | int noop; 29 | }; 30 | 31 | uniform vec4 EnableCustomWeight; 32 | uniform vec4 CenterWeight; 33 | uniform vec4 Adaptation; 34 | uniform vec4 AdaptiveParameters; 35 | uniform vec4 LogLuminanceRange; 36 | uniform vec4 MinLogLuminance; 37 | uniform vec4 PreExposureEnabled; 38 | uniform vec4 ScreenSize; 39 | vec4 ViewRect; 40 | mat4 Proj; 41 | mat4 View; 42 | vec4 ViewTexel; 43 | mat4 InvView; 44 | mat4 InvProj; 45 | mat4 ViewProj; 46 | mat4 InvViewProj; 47 | mat4 PrevViewProj; 48 | mat4 WorldArray[4]; 49 | mat4 World; 50 | mat4 WorldView; 51 | mat4 WorldViewProj; 52 | vec4 PrevWorldPosOffset; 53 | vec4 AlphaRef4; 54 | float AlphaRef; 55 | struct Histogram { 56 | uint count; 57 | }; 58 | 59 | struct VertexInput { 60 | float dummy; 61 | }; 62 | 63 | struct VertexOutput { 64 | vec4 position; 65 | }; 66 | 67 | struct FragmentInput { 68 | float dummy; 69 | }; 70 | 71 | struct FragmentOutput { 72 | vec4 Color0; 73 | }; 74 | 75 | SAMPLER2D_AUTOREG(s_GameColor); 76 | IMAGE2D_RW_AUTOREG(s_AdaptedFrameAverageLuminance, r32f); 77 | SAMPLER2D_AUTOREG(s_CustomWeight); 78 | SAMPLER2D_AUTOREG(s_PreviousFrameAverageLuminance); 79 | const float kHistogramWeightScaleFactor = float(1 << 8); 80 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 81 | } 82 | void main() { 83 | VertexInput vertexInput; 84 | VertexOutput vertexOutput; 85 | vertexOutput.position = vec4(0, 0, 0, 0); 86 | ViewRect = u_viewRect; 87 | Proj = u_proj; 88 | View = u_view; 89 | ViewTexel = u_viewTexel; 90 | InvView = u_invView; 91 | InvProj = u_invProj; 92 | ViewProj = u_viewProj; 93 | InvViewProj = u_invViewProj; 94 | PrevViewProj = u_prevViewProj; 95 | { 96 | WorldArray[0] = u_model[0]; 97 | WorldArray[1] = u_model[1]; 98 | WorldArray[2] = u_model[2]; 99 | WorldArray[3] = u_model[3]; 100 | } 101 | World = u_model[0]; 102 | WorldView = u_modelView; 103 | WorldViewProj = u_modelViewProj; 104 | PrevWorldPosOffset = u_prevWorldPosOffset; 105 | AlphaRef4 = u_alphaRef4; 106 | AlphaRef = u_alphaRef4.x; 107 | Vert(vertexInput, vertexOutput); 108 | gl_Position = vertexOutput.position; 109 | } 110 | 111 | -------------------------------------------------------------------------------- /materials/MeshFallbackForwardPBR/MeshFallbackForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec4 a_tangent : TANGENT; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec3 v_bitangent : BITANGENT; 12 | vec4 v_color0 : COLOR0; 13 | vec3 v_prevWorldPos : TEXCOORD4; 14 | vec3 v_tangent : TANGENT; 15 | vec2 v_texcoord0 : TEXCOORD0; 16 | vec3 v_viewSpaceNormal : NORMAL; 17 | vec3 v_worldPos : TEXCOORD3; 18 | -------------------------------------------------------------------------------- /materials/MeshFallbackPosUVNormalColor/MeshFallbackPosUVNormalColor.ESSL_310.Unknown.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - ALPHA_TEST_PASS (not used) 8 | * - DEPTH_ONLY_PASS (not used) 9 | * - OPAQUE_PASS (not used) 10 | * - RASTERIZED_ALPHA_TEST_PASS (not used) 11 | * - RASTERIZED_OPAQUE_PASS (not used) 12 | * - RASTERIZED_TRANSPARENT_PASS (not used) 13 | * - TRANSPARENT_PASS (not used) 14 | * 15 | * AlphaTest: 16 | * - ALPHA_TEST__OFF (not used) 17 | * - ALPHA_TEST__ON_DISCARD_VALUE_BASED (not used) 18 | * - ALPHA_TEST__ON_VERTEX_TINT_MASK_BASED (not used) 19 | * 20 | * Lit: 21 | * - LIT__OFF (not used) 22 | * - LIT__ON (not used) 23 | * 24 | * MultiColorTint: 25 | * - MULTI_COLOR_TINT__OFF (not used) 26 | * - MULTI_COLOR_TINT__ON (not used) 27 | * 28 | * UseTextures: 29 | * - USE_TEXTURES__OFF (not used) 30 | * - USE_TEXTURES__ON (not used) 31 | */ 32 | 33 | #if GL_FRAGMENT_PRECISION_HIGH 34 | precision highp float; 35 | #else 36 | precision mediump float; 37 | #endif 38 | #define attribute in 39 | #define varying in 40 | out vec4 bgfx_FragColor; 41 | varying vec4 v_color; 42 | varying vec4 v_fog; 43 | varying vec4 v_light; 44 | centroid varying vec2 v_texCoords; 45 | struct NoopSampler { 46 | int noop; 47 | }; 48 | 49 | struct NoopImage2D { 50 | int noop; 51 | }; 52 | 53 | struct NoopImage3D { 54 | int noop; 55 | }; 56 | 57 | struct rayQueryKHR { 58 | int noop; 59 | }; 60 | 61 | struct accelerationStructureKHR { 62 | int noop; 63 | }; 64 | 65 | struct FragmentOutput { 66 | vec4 Color0; 67 | }; 68 | 69 | void main() { 70 | FragmentOutput fragmentOutput; 71 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 72 | bgfx_FragColor = fragmentOutput.Color0; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /materials/MeshFallbackPosUVNormalColor/MeshFallbackPosUVNormalColor.ESSL_310.Unknown.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - ALPHA_TEST_PASS (not used) 6 | * - DEPTH_ONLY_PASS (not used) 7 | * - OPAQUE_PASS (not used) 8 | * - RASTERIZED_ALPHA_TEST_PASS (not used) 9 | * - RASTERIZED_OPAQUE_PASS (not used) 10 | * - RASTERIZED_TRANSPARENT_PASS (not used) 11 | * - TRANSPARENT_PASS (not used) 12 | * 13 | * AlphaTest: 14 | * - ALPHA_TEST__OFF (not used) 15 | * - ALPHA_TEST__ON_DISCARD_VALUE_BASED (not used) 16 | * - ALPHA_TEST__ON_VERTEX_TINT_MASK_BASED (not used) 17 | * 18 | * Lit: 19 | * - LIT__OFF (not used) 20 | * - LIT__ON (not used) 21 | * 22 | * MultiColorTint: 23 | * - MULTI_COLOR_TINT__OFF (not used) 24 | * - MULTI_COLOR_TINT__ON (not used) 25 | * 26 | * UseTextures: 27 | * - USE_TEXTURES__OFF (not used) 28 | * - USE_TEXTURES__ON (not used) 29 | */ 30 | 31 | $input v_color, v_fog, v_light, v_texCoords 32 | struct NoopSampler { 33 | int noop; 34 | }; 35 | 36 | struct NoopImage2D { 37 | int noop; 38 | }; 39 | 40 | struct NoopImage3D { 41 | int noop; 42 | }; 43 | 44 | struct rayQueryKHR { 45 | int noop; 46 | }; 47 | 48 | struct accelerationStructureKHR { 49 | int noop; 50 | }; 51 | 52 | struct FragmentOutput { 53 | vec4 Color0; 54 | }; 55 | 56 | void main() { 57 | FragmentOutput fragmentOutput; 58 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 59 | gl_FragColor = fragmentOutput.Color0; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /materials/MeshFallbackPosUVNormalColor/MeshFallbackPosUVNormalColor.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | #ifndef DEPTH_ONLY_PASS 6 | 7 | vec4 v_color : COLOR0; 8 | vec4 v_fog : COLOR2; 9 | vec4 v_light : COLOR1; 10 | centroid vec2 v_texCoords : TEXCOORD0; 11 | #endif 12 | -------------------------------------------------------------------------------- /materials/MeshFallbackPrepass/MeshFallbackPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec4 a_tangent : TANGENT; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec3 v_bitangent : BITANGENT; 12 | vec4 v_color0 : COLOR0; 13 | vec3 v_normal : NORMAL; 14 | vec3 v_prevWorldPos : TEXCOORD4; 15 | vec3 v_tangent : TANGENT; 16 | vec2 v_texcoord0 : TEXCOORD0; 17 | vec3 v_worldPos : TEXCOORD3; 18 | -------------------------------------------------------------------------------- /materials/MinecraftColor/MinecraftColor.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 i_data1 : TEXCOORD7; 7 | vec4 i_data2 : TEXCOORD6; 8 | vec4 i_data3 : TEXCOORD5; 9 | 10 | vec4 v_color0 : COLOR0; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_viewSpaceNormal : NORMAL; 13 | vec3 v_worldPos : TEXCOORD3; 14 | -------------------------------------------------------------------------------- /materials/Mip/Mip.ESSL_310.Compute.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - FALLBACK_PASS (not used) 8 | * - MIP_DISTANCE_PASS (not used) 9 | */ 10 | 11 | #extension GL_EXT_texture_cube_map_array : enable 12 | #define shadow2D(_sampler, _coord)texture(_sampler, _coord) 13 | #define shadow2DArray(_sampler, _coord)texture(_sampler, _coord) 14 | #define shadow2DProj(_sampler, _coord)textureProj(_sampler, _coord) 15 | struct NoopSampler { 16 | int noop; 17 | }; 18 | 19 | struct NoopImage2D { 20 | int noop; 21 | }; 22 | 23 | struct NoopImage3D { 24 | int noop; 25 | }; 26 | 27 | struct rayQueryKHR { 28 | int noop; 29 | }; 30 | 31 | struct accelerationStructureKHR { 32 | int noop; 33 | }; 34 | 35 | uniform vec4 Levels; 36 | uniform vec4 ScreenSize; 37 | uniform mat4 SceneInverseProjection; 38 | uvec3 LocalInvocationID; 39 | uint LocalInvocationIndex; 40 | uvec3 GlobalInvocationID; 41 | uvec3 WorkGroupID; 42 | struct VertexInput { 43 | float dummy; 44 | }; 45 | 46 | struct VertexOutput { 47 | vec4 position; 48 | }; 49 | 50 | struct FragmentInput { 51 | float dummy; 52 | }; 53 | 54 | struct FragmentOutput { 55 | vec4 Color0; 56 | }; 57 | 58 | layout(rgba16f, binding = 0)writeonly uniform highp image2D s_OutputMip; 59 | uniform lowp sampler2D s_FramebufferDepth; 60 | layout(rgba16f, binding = 2)readonly uniform highp image2D s_InputMip; 61 | void MipDistance() { 62 | } 63 | 64 | layout(local_size_x = 8, local_size_y = 8, local_size_z = 1)in; 65 | void main() { 66 | LocalInvocationID = gl_LocalInvocationID; 67 | LocalInvocationIndex = gl_LocalInvocationIndex; 68 | GlobalInvocationID = gl_GlobalInvocationID; 69 | WorkGroupID = gl_WorkGroupID; 70 | MipDistance(); 71 | } 72 | 73 | -------------------------------------------------------------------------------- /materials/Mip/Mip.ESSL_310.Compute.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - MIP_DISTANCE_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 Levels; 30 | uniform vec4 ScreenSize; 31 | uniform mat4 SceneInverseProjection; 32 | uvec3 LocalInvocationID; 33 | uint LocalInvocationIndex; 34 | uvec3 GlobalInvocationID; 35 | uvec3 WorkGroupID; 36 | struct VertexInput { 37 | float dummy; 38 | }; 39 | 40 | struct VertexOutput { 41 | vec4 position; 42 | }; 43 | 44 | struct FragmentInput { 45 | float dummy; 46 | }; 47 | 48 | struct FragmentOutput { 49 | vec4 Color0; 50 | }; 51 | 52 | IMAGE2D_WR_AUTOREG(s_OutputMip, rgba16f); 53 | SAMPLER2D_AUTOREG(s_FramebufferDepth); 54 | IMAGE2D_RO_AUTOREG(s_InputMip, rgba16f); 55 | void MipDistance() { 56 | } 57 | 58 | NUM_THREADS(8, 8, 1) 59 | void main() { 60 | LocalInvocationID = gl_LocalInvocationID; 61 | LocalInvocationIndex = gl_LocalInvocationIndex; 62 | GlobalInvocationID = gl_GlobalInvocationID; 63 | WorkGroupID = gl_WorkGroupID; 64 | MipDistance(); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /materials/Mip/Mip.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - MIP_DISTANCE_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform mat4 SceneInverseProjection; 30 | uniform vec4 Levels; 31 | uniform vec4 ScreenSize; 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | float dummy; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | }; 55 | 56 | struct FragmentInput { 57 | float dummy; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | IMAGE2D_WR_AUTOREG(s_OutputMip, rgba16f); 65 | SAMPLER2D_AUTOREG(s_FramebufferDepth); 66 | IMAGE2D_RO_AUTOREG(s_InputMip, rgba16f); 67 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 68 | fragOutput.Color0 = vec4(0.0, 0.0, 0.0, 0.0); 69 | } 70 | void main() { 71 | FragmentInput fragmentInput; 72 | FragmentOutput fragmentOutput; 73 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 74 | ViewRect = u_viewRect; 75 | Proj = u_proj; 76 | View = u_view; 77 | ViewTexel = u_viewTexel; 78 | InvView = u_invView; 79 | InvProj = u_invProj; 80 | ViewProj = u_viewProj; 81 | InvViewProj = u_invViewProj; 82 | PrevViewProj = u_prevViewProj; 83 | { 84 | WorldArray[0] = u_model[0]; 85 | WorldArray[1] = u_model[1]; 86 | WorldArray[2] = u_model[2]; 87 | WorldArray[3] = u_model[3]; 88 | } 89 | World = u_model[0]; 90 | WorldView = u_modelView; 91 | WorldViewProj = u_modelViewProj; 92 | PrevWorldPosOffset = u_prevWorldPosOffset; 93 | AlphaRef4 = u_alphaRef4; 94 | AlphaRef = u_alphaRef4.x; 95 | Frag(fragmentInput, fragmentOutput); 96 | gl_FragColor = fragmentOutput.Color0; 97 | } 98 | 99 | -------------------------------------------------------------------------------- /materials/Mip/Mip.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - MIP_DISTANCE_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform mat4 SceneInverseProjection; 30 | uniform vec4 Levels; 31 | uniform vec4 ScreenSize; 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | float dummy; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | }; 55 | 56 | struct FragmentInput { 57 | float dummy; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | IMAGE2D_WR_AUTOREG(s_OutputMip, rgba16f); 65 | SAMPLER2D_AUTOREG(s_FramebufferDepth); 66 | IMAGE2D_RO_AUTOREG(s_InputMip, rgba16f); 67 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 68 | } 69 | void main() { 70 | VertexInput vertexInput; 71 | VertexOutput vertexOutput; 72 | vertexOutput.position = vec4(0, 0, 0, 0); 73 | ViewRect = u_viewRect; 74 | Proj = u_proj; 75 | View = u_view; 76 | ViewTexel = u_viewTexel; 77 | InvView = u_invView; 78 | InvProj = u_invProj; 79 | ViewProj = u_viewProj; 80 | InvViewProj = u_invViewProj; 81 | PrevViewProj = u_prevViewProj; 82 | { 83 | WorldArray[0] = u_model[0]; 84 | WorldArray[1] = u_model[1]; 85 | WorldArray[2] = u_model[2]; 86 | WorldArray[3] = u_model[3]; 87 | } 88 | World = u_model[0]; 89 | WorldView = u_modelView; 90 | WorldViewProj = u_modelViewProj; 91 | PrevWorldPosOffset = u_prevWorldPosOffset; 92 | AlphaRef4 = u_alphaRef4; 93 | AlphaRef = u_alphaRef4.x; 94 | Vert(vertexInput, vertexOutput); 95 | gl_Position = vertexOutput.position; 96 | } 97 | 98 | -------------------------------------------------------------------------------- /materials/Particle/Particle.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec4 v_fog : COLOR1; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_worldPos : TEXCOORD3; 13 | -------------------------------------------------------------------------------- /materials/ParticleForwardPBR/ParticleForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec4 v_fog : COLOR1; 11 | vec3 v_normal : NORMAL; 12 | vec2 v_texcoord0 : TEXCOORD0; 13 | vec3 v_worldPos : TEXCOORD3; 14 | -------------------------------------------------------------------------------- /materials/ParticlePrepass/ParticlePrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec2 a_texcoord1 : TEXCOORD1; 2 | vec4 a_color0 : COLOR0; 3 | vec4 a_normal : NORMAL; 4 | vec3 a_position : POSITION; 5 | vec2 a_texcoord0 : TEXCOORD0; 6 | 7 | vec4 i_data1 : TEXCOORD7; 8 | vec4 i_data2 : TEXCOORD6; 9 | vec4 i_data3 : TEXCOORD5; 10 | 11 | vec2 v_ambientLight : TEXCOORD1; 12 | vec3 v_bitangent : BITANGENT; 13 | vec4 v_color0 : COLOR0; 14 | vec4 v_fog : COLOR1; 15 | vec3 v_normal : NORMAL; 16 | vec3 v_prevWorldPos : TEXCOORD4; 17 | vec3 v_tangent : TANGENT; 18 | vec2 v_texcoord0 : TEXCOORD0; 19 | vec3 v_worldPos : TEXCOORD3; 20 | -------------------------------------------------------------------------------- /materials/PostFX.Debug/PostFX.Debug.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - DEBUG_BLIT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 ClipPlanes; 31 | uniform vec4 DebugMode; 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | vec4 position; 50 | vec2 texcoord0; 51 | }; 52 | 53 | struct VertexOutput { 54 | vec4 position; 55 | vec2 texcoord0; 56 | }; 57 | 58 | struct FragmentInput { 59 | vec2 texcoord0; 60 | }; 61 | 62 | struct FragmentOutput { 63 | vec4 Color0; 64 | }; 65 | 66 | SAMPLER2D_AUTOREG(s_RasterColor); 67 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 68 | vertOutput.position = vec4(vertInput.position.xy * 2.0 - 1.0, 0.0, 1.0); 69 | vertOutput.texcoord0 = vec2(vertInput.texcoord0.x, vertInput.texcoord0.y); 70 | } 71 | void main() { 72 | VertexInput vertexInput; 73 | VertexOutput vertexOutput; 74 | vertexInput.position = (a_position); 75 | vertexInput.texcoord0 = (a_texcoord0); 76 | vertexOutput.texcoord0 = vec2(0, 0); 77 | vertexOutput.position = vec4(0, 0, 0, 0); 78 | ViewRect = u_viewRect; 79 | Proj = u_proj; 80 | View = u_view; 81 | ViewTexel = u_viewTexel; 82 | InvView = u_invView; 83 | InvProj = u_invProj; 84 | ViewProj = u_viewProj; 85 | InvViewProj = u_invViewProj; 86 | PrevViewProj = u_prevViewProj; 87 | { 88 | WorldArray[0] = u_model[0]; 89 | WorldArray[1] = u_model[1]; 90 | WorldArray[2] = u_model[2]; 91 | WorldArray[3] = u_model[3]; 92 | } 93 | World = u_model[0]; 94 | WorldView = u_modelView; 95 | WorldViewProj = u_modelViewProj; 96 | PrevWorldPosOffset = u_prevWorldPosOffset; 97 | AlphaRef4 = u_alphaRef4; 98 | AlphaRef = u_alphaRef4.x; 99 | Vert(vertexInput, vertexOutput); 100 | v_texcoord0 = vertexOutput.texcoord0; 101 | gl_Position = vertexOutput.position; 102 | } 103 | 104 | -------------------------------------------------------------------------------- /materials/PostFX.Debug/PostFX.Debug.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/PrepassFallback/PrepassFallback.ESSL_310.Fragment.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - FALLBACK_PASS (not used) 8 | */ 9 | 10 | #if GL_FRAGMENT_PRECISION_HIGH 11 | precision highp float; 12 | #else 13 | precision mediump float; 14 | #endif 15 | #define attribute in 16 | #define varying in 17 | out vec4 bgfx_FragColor; 18 | struct NoopSampler { 19 | int noop; 20 | }; 21 | 22 | struct NoopImage2D { 23 | int noop; 24 | }; 25 | 26 | struct NoopImage3D { 27 | int noop; 28 | }; 29 | 30 | struct rayQueryKHR { 31 | int noop; 32 | }; 33 | 34 | struct accelerationStructureKHR { 35 | int noop; 36 | }; 37 | 38 | uniform vec4 u_viewRect; 39 | uniform mat4 u_proj; 40 | uniform mat4 u_view; 41 | uniform vec4 u_viewTexel; 42 | uniform mat4 u_invView; 43 | uniform mat4 u_invProj; 44 | uniform mat4 u_viewProj; 45 | uniform mat4 u_invViewProj; 46 | uniform mat4 u_prevViewProj; 47 | uniform mat4 u_model[4]; 48 | uniform mat4 u_modelView; 49 | uniform mat4 u_modelViewProj; 50 | uniform vec4 u_prevWorldPosOffset; 51 | uniform vec4 u_alphaRef4; 52 | vec4 ViewRect; 53 | mat4 Proj; 54 | mat4 View; 55 | vec4 ViewTexel; 56 | mat4 InvView; 57 | mat4 InvProj; 58 | mat4 ViewProj; 59 | mat4 InvViewProj; 60 | mat4 PrevViewProj; 61 | mat4 WorldArray[4]; 62 | mat4 World; 63 | mat4 WorldView; 64 | mat4 WorldViewProj; 65 | vec4 PrevWorldPosOffset; 66 | vec4 AlphaRef4; 67 | float AlphaRef; 68 | struct VertexInput { 69 | float dummy; 70 | }; 71 | 72 | struct VertexOutput { 73 | vec4 position; 74 | }; 75 | 76 | struct FragmentInput { 77 | float dummy; 78 | }; 79 | 80 | struct FragmentOutput { 81 | vec4 Color0; 82 | }; 83 | 84 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 85 | fragOutput.Color0 = vec4(0.0, 0.0, 0.0, 0.0); 86 | } 87 | void main() { 88 | FragmentInput fragmentInput; 89 | FragmentOutput fragmentOutput; 90 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 91 | ViewRect = u_viewRect; 92 | Proj = u_proj; 93 | View = u_view; 94 | ViewTexel = u_viewTexel; 95 | InvView = u_invView; 96 | InvProj = u_invProj; 97 | ViewProj = u_viewProj; 98 | InvViewProj = u_invViewProj; 99 | PrevViewProj = u_prevViewProj; 100 | { 101 | WorldArray[0] = u_model[0]; 102 | WorldArray[1] = u_model[1]; 103 | WorldArray[2] = u_model[2]; 104 | WorldArray[3] = u_model[3]; 105 | } 106 | World = u_model[0]; 107 | WorldView = u_modelView; 108 | WorldViewProj = u_modelViewProj; 109 | PrevWorldPosOffset = u_prevWorldPosOffset; 110 | AlphaRef4 = u_alphaRef4; 111 | AlphaRef = u_alphaRef4.x; 112 | Frag(fragmentInput, fragmentOutput); 113 | bgfx_FragColor = fragmentOutput.Color0; 114 | } 115 | 116 | -------------------------------------------------------------------------------- /materials/PrepassFallback/PrepassFallback.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | vec4 ViewRect; 29 | mat4 Proj; 30 | mat4 View; 31 | vec4 ViewTexel; 32 | mat4 InvView; 33 | mat4 InvProj; 34 | mat4 ViewProj; 35 | mat4 InvViewProj; 36 | mat4 PrevViewProj; 37 | mat4 WorldArray[4]; 38 | mat4 World; 39 | mat4 WorldView; 40 | mat4 WorldViewProj; 41 | vec4 PrevWorldPosOffset; 42 | vec4 AlphaRef4; 43 | float AlphaRef; 44 | struct VertexInput { 45 | float dummy; 46 | }; 47 | 48 | struct VertexOutput { 49 | vec4 position; 50 | }; 51 | 52 | struct FragmentInput { 53 | float dummy; 54 | }; 55 | 56 | struct FragmentOutput { 57 | vec4 Color0; 58 | }; 59 | 60 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 61 | fragOutput.Color0 = vec4(0.0, 0.0, 0.0, 0.0); 62 | } 63 | void main() { 64 | FragmentInput fragmentInput; 65 | FragmentOutput fragmentOutput; 66 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 67 | ViewRect = u_viewRect; 68 | Proj = u_proj; 69 | View = u_view; 70 | ViewTexel = u_viewTexel; 71 | InvView = u_invView; 72 | InvProj = u_invProj; 73 | ViewProj = u_viewProj; 74 | InvViewProj = u_invViewProj; 75 | PrevViewProj = u_prevViewProj; 76 | { 77 | WorldArray[0] = u_model[0]; 78 | WorldArray[1] = u_model[1]; 79 | WorldArray[2] = u_model[2]; 80 | WorldArray[3] = u_model[3]; 81 | } 82 | World = u_model[0]; 83 | WorldView = u_modelView; 84 | WorldViewProj = u_modelViewProj; 85 | PrevWorldPosOffset = u_prevWorldPosOffset; 86 | AlphaRef4 = u_alphaRef4; 87 | AlphaRef = u_alphaRef4.x; 88 | Frag(fragmentInput, fragmentOutput); 89 | gl_FragColor = fragmentOutput.Color0; 90 | } 91 | 92 | -------------------------------------------------------------------------------- /materials/PrepassFallback/PrepassFallback.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - FALLBACK_PASS (not used) 8 | */ 9 | 10 | #define attribute in 11 | #define varying out 12 | struct NoopSampler { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage2D { 17 | int noop; 18 | }; 19 | 20 | struct NoopImage3D { 21 | int noop; 22 | }; 23 | 24 | struct rayQueryKHR { 25 | int noop; 26 | }; 27 | 28 | struct accelerationStructureKHR { 29 | int noop; 30 | }; 31 | 32 | uniform vec4 u_viewRect; 33 | uniform mat4 u_proj; 34 | uniform mat4 u_view; 35 | uniform vec4 u_viewTexel; 36 | uniform mat4 u_invView; 37 | uniform mat4 u_invProj; 38 | uniform mat4 u_viewProj; 39 | uniform mat4 u_invViewProj; 40 | uniform mat4 u_prevViewProj; 41 | uniform mat4 u_model[4]; 42 | uniform mat4 u_modelView; 43 | uniform mat4 u_modelViewProj; 44 | uniform vec4 u_prevWorldPosOffset; 45 | uniform vec4 u_alphaRef4; 46 | vec4 ViewRect; 47 | mat4 Proj; 48 | mat4 View; 49 | vec4 ViewTexel; 50 | mat4 InvView; 51 | mat4 InvProj; 52 | mat4 ViewProj; 53 | mat4 InvViewProj; 54 | mat4 PrevViewProj; 55 | mat4 WorldArray[4]; 56 | mat4 World; 57 | mat4 WorldView; 58 | mat4 WorldViewProj; 59 | vec4 PrevWorldPosOffset; 60 | vec4 AlphaRef4; 61 | float AlphaRef; 62 | struct VertexInput { 63 | float dummy; 64 | }; 65 | 66 | struct VertexOutput { 67 | vec4 position; 68 | }; 69 | 70 | struct FragmentInput { 71 | float dummy; 72 | }; 73 | 74 | struct FragmentOutput { 75 | vec4 Color0; 76 | }; 77 | 78 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 79 | } 80 | void main() { 81 | VertexInput vertexInput; 82 | VertexOutput vertexOutput; 83 | vertexOutput.position = vec4(0, 0, 0, 0); 84 | ViewRect = u_viewRect; 85 | Proj = u_proj; 86 | View = u_view; 87 | ViewTexel = u_viewTexel; 88 | InvView = u_invView; 89 | InvProj = u_invProj; 90 | ViewProj = u_viewProj; 91 | InvViewProj = u_invViewProj; 92 | PrevViewProj = u_prevViewProj; 93 | { 94 | WorldArray[0] = u_model[0]; 95 | WorldArray[1] = u_model[1]; 96 | WorldArray[2] = u_model[2]; 97 | WorldArray[3] = u_model[3]; 98 | } 99 | World = u_model[0]; 100 | WorldView = u_modelView; 101 | WorldViewProj = u_modelViewProj; 102 | PrevWorldPosOffset = u_prevWorldPosOffset; 103 | AlphaRef4 = u_alphaRef4; 104 | AlphaRef = u_alphaRef4.x; 105 | Vert(vertexInput, vertexOutput); 106 | gl_Position = vertexOutput.position; 107 | } 108 | 109 | -------------------------------------------------------------------------------- /materials/PrepassFallback/PrepassFallback.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | vec4 ViewRect; 29 | mat4 Proj; 30 | mat4 View; 31 | vec4 ViewTexel; 32 | mat4 InvView; 33 | mat4 InvProj; 34 | mat4 ViewProj; 35 | mat4 InvViewProj; 36 | mat4 PrevViewProj; 37 | mat4 WorldArray[4]; 38 | mat4 World; 39 | mat4 WorldView; 40 | mat4 WorldViewProj; 41 | vec4 PrevWorldPosOffset; 42 | vec4 AlphaRef4; 43 | float AlphaRef; 44 | struct VertexInput { 45 | float dummy; 46 | }; 47 | 48 | struct VertexOutput { 49 | vec4 position; 50 | }; 51 | 52 | struct FragmentInput { 53 | float dummy; 54 | }; 55 | 56 | struct FragmentOutput { 57 | vec4 Color0; 58 | }; 59 | 60 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 61 | } 62 | void main() { 63 | VertexInput vertexInput; 64 | VertexOutput vertexOutput; 65 | vertexOutput.position = vec4(0, 0, 0, 0); 66 | ViewRect = u_viewRect; 67 | Proj = u_proj; 68 | View = u_view; 69 | ViewTexel = u_viewTexel; 70 | InvView = u_invView; 71 | InvProj = u_invProj; 72 | ViewProj = u_viewProj; 73 | InvViewProj = u_invViewProj; 74 | PrevViewProj = u_prevViewProj; 75 | { 76 | WorldArray[0] = u_model[0]; 77 | WorldArray[1] = u_model[1]; 78 | WorldArray[2] = u_model[2]; 79 | WorldArray[3] = u_model[3]; 80 | } 81 | World = u_model[0]; 82 | WorldView = u_modelView; 83 | WorldViewProj = u_modelViewProj; 84 | PrevWorldPosOffset = u_prevWorldPosOffset; 85 | AlphaRef4 = u_alphaRef4; 86 | AlphaRef = u_alphaRef4.x; 87 | Vert(vertexInput, vertexOutput); 88 | gl_Position = vertexOutput.position; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /materials/RTXPostFX.Bloom/RTXPostFX.Bloom.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - BLOOM_DOWNSCALE_GAUSSIAN_PASS (not used) 6 | * - BLOOM_DOWNSCALE_UNIFORM_PASS (not used) 7 | * - BLOOM_FINAL_PASS (not used) 8 | * - BLOOM_UPSCALE_PASS (not used) 9 | */ 10 | 11 | $input a_position, a_texcoord0 12 | $output v_texcoord0 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 RenderMode; 34 | uniform vec4 ScreenSize; 35 | uniform vec4 gBloomMultiplier; 36 | uniform vec4 gViewportScale; 37 | vec4 ViewRect; 38 | mat4 Proj; 39 | mat4 View; 40 | vec4 ViewTexel; 41 | mat4 InvView; 42 | mat4 InvProj; 43 | mat4 ViewProj; 44 | mat4 InvViewProj; 45 | mat4 PrevViewProj; 46 | mat4 WorldArray[4]; 47 | mat4 World; 48 | mat4 WorldView; 49 | mat4 WorldViewProj; 50 | vec4 PrevWorldPosOffset; 51 | vec4 AlphaRef4; 52 | float AlphaRef; 53 | struct VertexInput { 54 | vec4 position; 55 | vec2 texcoord0; 56 | }; 57 | 58 | struct VertexOutput { 59 | vec4 position; 60 | vec2 texcoord0; 61 | }; 62 | 63 | struct FragmentInput { 64 | vec2 texcoord0; 65 | }; 66 | 67 | struct FragmentOutput { 68 | vec4 Color0; 69 | }; 70 | 71 | SAMPLER2D_AUTOREG(s_RasterColor); 72 | SAMPLER2D_AUTOREG(s_gBloomOriginalInput); 73 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 74 | vertOutput.position = vec4(vertInput.position.xy * 2.0 - 1.0, 0.0, 1.0); 75 | vertOutput.texcoord0 = vec2(vertInput.texcoord0.x, vertInput.texcoord0.y); 76 | } 77 | void main() { 78 | VertexInput vertexInput; 79 | VertexOutput vertexOutput; 80 | vertexInput.position = (a_position); 81 | vertexInput.texcoord0 = (a_texcoord0); 82 | vertexOutput.texcoord0 = vec2(0, 0); 83 | vertexOutput.position = vec4(0, 0, 0, 0); 84 | ViewRect = u_viewRect; 85 | Proj = u_proj; 86 | View = u_view; 87 | ViewTexel = u_viewTexel; 88 | InvView = u_invView; 89 | InvProj = u_invProj; 90 | ViewProj = u_viewProj; 91 | InvViewProj = u_invViewProj; 92 | PrevViewProj = u_prevViewProj; 93 | { 94 | WorldArray[0] = u_model[0]; 95 | WorldArray[1] = u_model[1]; 96 | WorldArray[2] = u_model[2]; 97 | WorldArray[3] = u_model[3]; 98 | } 99 | World = u_model[0]; 100 | WorldView = u_modelView; 101 | WorldViewProj = u_modelViewProj; 102 | PrevWorldPosOffset = u_prevWorldPosOffset; 103 | AlphaRef4 = u_alphaRef4; 104 | AlphaRef = u_alphaRef4.x; 105 | Vert(vertexInput, vertexOutput); 106 | v_texcoord0 = vertexOutput.texcoord0; 107 | gl_Position = vertexOutput.position; 108 | } 109 | 110 | -------------------------------------------------------------------------------- /materials/RTXPostFX.Bloom/RTXPostFX.Bloom.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/RTXPostFX.Tonemapping/RTXPostFX.Tonemapping.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/RenderChunk/RenderChunk.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec2 a_texcoord1 : TEXCOORD1; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 i_data1 : TEXCOORD7; 7 | vec4 i_data2 : TEXCOORD6; 8 | vec4 i_data3 : TEXCOORD5; 9 | 10 | vec4 v_color0 : COLOR0; 11 | vec4 v_fog : COLOR2; 12 | vec2 v_lightmapUV : TEXCOORD1; 13 | centroid vec2 v_texcoord0 : TEXCOORD0; 14 | vec3 v_worldPos : TEXCOORD3; 15 | -------------------------------------------------------------------------------- /materials/RenderChunkForwardPBR/RenderChunkForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec2 a_texcoord1 : TEXCOORD1; 3 | vec4 a_normal : NORMAL; 4 | #if defined(FORWARD_PBR_TRANSPARENT_PASS) || defined(OPAQUE_PASS) 5 | int a_texcoord4 : TEXCOORD4; 6 | #endif 7 | vec3 a_position : POSITION; 8 | vec4 a_tangent : TANGENT; 9 | vec2 a_texcoord0 : TEXCOORD0; 10 | 11 | vec4 i_data1 : TEXCOORD7; 12 | vec4 i_data2 : TEXCOORD6; 13 | vec4 i_data3 : TEXCOORD5; 14 | 15 | vec3 v_bitangent : BITANGENT; 16 | vec4 v_color0 : COLOR0; 17 | #ifdef FORWARD_PBR_TRANSPARENT_PASS 18 | flat int v_frontFacing : FRONTFACING; 19 | #endif 20 | vec2 v_lightmapUV : TEXCOORD1; 21 | vec3 v_normal : NORMAL; 22 | #if defined(FORWARD_PBR_TRANSPARENT_PASS) || defined(OPAQUE_PASS) 23 | flat int v_pbrTextureId : TEXCOORD4; 24 | #endif 25 | vec3 v_tangent : TANGENT; 26 | centroid vec2 v_texcoord0 : TEXCOORD0; 27 | vec3 v_worldPos : TEXCOORD3; 28 | -------------------------------------------------------------------------------- /materials/RenderChunkPrepass/RenderChunkPrepass.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec2 a_texcoord1 : TEXCOORD1; 3 | vec4 a_normal : NORMAL; 4 | #if defined(GEOMETRY_PREPASS_ALPHA_TEST_PASS) || defined(GEOMETRY_PREPASS_PASS) 5 | int a_texcoord4 : TEXCOORD4; 6 | #endif 7 | vec3 a_position : POSITION; 8 | vec4 a_tangent : TANGENT; 9 | vec2 a_texcoord0 : TEXCOORD0; 10 | 11 | vec4 i_data1 : TEXCOORD7; 12 | vec4 i_data2 : TEXCOORD6; 13 | vec4 i_data3 : TEXCOORD5; 14 | 15 | vec3 v_bitangent : BITANGENT; 16 | vec4 v_color0 : COLOR0; 17 | #if defined(GEOMETRY_PREPASS_ALPHA_TEST_PASS) || defined(GEOMETRY_PREPASS_PASS) 18 | flat int v_frontFacing : FRONTFACING; 19 | #endif 20 | vec2 v_lightmapUV : TEXCOORD1; 21 | vec3 v_normal : NORMAL; 22 | #if defined(GEOMETRY_PREPASS_ALPHA_TEST_PASS) || defined(GEOMETRY_PREPASS_PASS) 23 | flat int v_pbrTextureId : TEXCOORD4; 24 | #endif 25 | vec3 v_tangent : TANGENT; 26 | vec2 v_texcoord0 : TEXCOORD0; 27 | vec3 v_worldPos : TEXCOORD3; 28 | -------------------------------------------------------------------------------- /materials/ScreenBlit/ScreenBlit.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - BLIT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | vec2 texcoord0; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | vec2 texcoord0; 54 | }; 55 | 56 | struct FragmentInput { 57 | vec2 texcoord0; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | SAMPLER2D_AUTOREG(s_MatTexture); 65 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 66 | vertOutput.position = vec4(vertInput.position, 1.0); 67 | vertOutput.position.xy = vertOutput.position.xy * 2.0 - 1.0; 68 | vertOutput.texcoord0 = vertInput.texcoord0; 69 | } 70 | void main() { 71 | VertexInput vertexInput; 72 | VertexOutput vertexOutput; 73 | vertexInput.position = (a_position); 74 | vertexInput.texcoord0 = (a_texcoord0); 75 | vertexOutput.texcoord0 = vec2(0, 0); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | v_texcoord0 = vertexOutput.texcoord0; 100 | gl_Position = vertexOutput.position; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /materials/ScreenBlit/ScreenBlit.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/ScreenSpaceReflections/ScreenSpaceReflections.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | #ifdef SSR_RAY_MARCH_PASS 5 | vec4 v_projPosition : TEXCOORD1; 6 | #endif 7 | vec2 v_texcoord0 : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/ScreenUV/ScreenUV.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - SCREEN_PASS (not used) 6 | */ 7 | 8 | $input v_color 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | vec4 ViewRect; 30 | mat4 Proj; 31 | mat4 View; 32 | vec4 ViewTexel; 33 | mat4 InvView; 34 | mat4 InvProj; 35 | mat4 ViewProj; 36 | mat4 InvViewProj; 37 | mat4 PrevViewProj; 38 | mat4 WorldArray[4]; 39 | mat4 World; 40 | mat4 WorldView; 41 | mat4 WorldViewProj; 42 | vec4 PrevWorldPosOffset; 43 | vec4 AlphaRef4; 44 | float AlphaRef; 45 | struct VertexInput { 46 | vec3 position; 47 | vec2 texcoord0; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | vec4 color; 53 | }; 54 | 55 | struct FragmentInput { 56 | vec4 color; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 64 | fragOutput.Color0 = fragInput.color; 65 | } 66 | void main() { 67 | FragmentInput fragmentInput; 68 | FragmentOutput fragmentOutput; 69 | fragmentInput.color = v_color; 70 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Frag(fragmentInput, fragmentOutput); 93 | gl_FragColor = fragmentOutput.Color0; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/ScreenUV/ScreenUV.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - SCREEN_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_color 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | vec2 texcoord0; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | vec4 color; 54 | }; 55 | 56 | struct FragmentInput { 57 | vec4 color; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 65 | vertOutput.position = vec4(vertInput.position.xy * 2.0 - 1.0, 0.0, 1.0); 66 | vertOutput.color = vec4(vertInput.texcoord0.xy, 1.0, 1.0); 67 | } 68 | void main() { 69 | VertexInput vertexInput; 70 | VertexOutput vertexOutput; 71 | vertexInput.position = (a_position); 72 | vertexInput.texcoord0 = (a_texcoord0); 73 | vertexOutput.color = vec4(0, 0, 0, 0); 74 | vertexOutput.position = vec4(0, 0, 0, 0); 75 | ViewRect = u_viewRect; 76 | Proj = u_proj; 77 | View = u_view; 78 | ViewTexel = u_viewTexel; 79 | InvView = u_invView; 80 | InvProj = u_invProj; 81 | ViewProj = u_viewProj; 82 | InvViewProj = u_invViewProj; 83 | PrevViewProj = u_prevViewProj; 84 | { 85 | WorldArray[0] = u_model[0]; 86 | WorldArray[1] = u_model[1]; 87 | WorldArray[2] = u_model[2]; 88 | WorldArray[3] = u_model[3]; 89 | } 90 | World = u_model[0]; 91 | WorldView = u_modelView; 92 | WorldViewProj = u_modelViewProj; 93 | PrevWorldPosOffset = u_prevWorldPosOffset; 94 | AlphaRef4 = u_alphaRef4; 95 | AlphaRef = u_alphaRef4.x; 96 | Vert(vertexInput, vertexOutput); 97 | v_color = vertexOutput.color; 98 | gl_Position = vertexOutput.position; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /materials/ScreenUV/ScreenUV.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec4 v_color : COLOR0; 5 | -------------------------------------------------------------------------------- /materials/ShadowOverlay/ShadowOverlay.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input v_color0 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 ShadowColor; 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec4 color0; 48 | vec3 position; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | vec4 color0; 54 | }; 55 | 56 | struct FragmentInput { 57 | vec4 color0; 58 | }; 59 | 60 | struct FragmentOutput { 61 | vec4 Color0; 62 | }; 63 | 64 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 65 | vec3 shadowedColor = mix(fragInput.color0.rgb, ShadowColor.rgb, fragInput.color0.a); 66 | fragOutput.Color0 = vec4(shadowedColor, 1.0); 67 | } 68 | void main() { 69 | FragmentInput fragmentInput; 70 | FragmentOutput fragmentOutput; 71 | fragmentInput.color0 = v_color0; 72 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 73 | ViewRect = u_viewRect; 74 | Proj = u_proj; 75 | View = u_view; 76 | ViewTexel = u_viewTexel; 77 | InvView = u_invView; 78 | InvProj = u_invProj; 79 | ViewProj = u_viewProj; 80 | InvViewProj = u_invViewProj; 81 | PrevViewProj = u_prevViewProj; 82 | { 83 | WorldArray[0] = u_model[0]; 84 | WorldArray[1] = u_model[1]; 85 | WorldArray[2] = u_model[2]; 86 | WorldArray[3] = u_model[3]; 87 | } 88 | World = u_model[0]; 89 | WorldView = u_modelView; 90 | WorldViewProj = u_modelViewProj; 91 | PrevWorldPosOffset = u_prevWorldPosOffset; 92 | AlphaRef4 = u_alphaRef4; 93 | AlphaRef = u_alphaRef4.x; 94 | Frag(fragmentInput, fragmentOutput); 95 | gl_FragColor = fragmentOutput.Color0; 96 | } 97 | 98 | -------------------------------------------------------------------------------- /materials/ShadowOverlay/ShadowOverlay.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_color0, a_position 9 | $output v_color0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 ShadowColor; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec4 color0; 49 | vec3 position; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | vec4 color0; 55 | }; 56 | 57 | struct FragmentInput { 58 | vec4 color0; 59 | }; 60 | 61 | struct FragmentOutput { 62 | vec4 Color0; 63 | }; 64 | 65 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 66 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 67 | vertOutput.color0 = vertInput.color0; 68 | } 69 | void main() { 70 | VertexInput vertexInput; 71 | VertexOutput vertexOutput; 72 | vertexInput.color0 = (a_color0); 73 | vertexInput.position = (a_position); 74 | vertexOutput.color0 = vec4(0, 0, 0, 0); 75 | vertexOutput.position = vec4(0, 0, 0, 0); 76 | ViewRect = u_viewRect; 77 | Proj = u_proj; 78 | View = u_view; 79 | ViewTexel = u_viewTexel; 80 | InvView = u_invView; 81 | InvProj = u_invProj; 82 | ViewProj = u_viewProj; 83 | InvViewProj = u_invViewProj; 84 | PrevViewProj = u_prevViewProj; 85 | { 86 | WorldArray[0] = u_model[0]; 87 | WorldArray[1] = u_model[1]; 88 | WorldArray[2] = u_model[2]; 89 | WorldArray[3] = u_model[3]; 90 | } 91 | World = u_model[0]; 92 | WorldView = u_modelView; 93 | WorldViewProj = u_modelViewProj; 94 | PrevWorldPosOffset = u_prevWorldPosOffset; 95 | AlphaRef4 = u_alphaRef4; 96 | AlphaRef = u_alphaRef4.x; 97 | Vert(vertexInput, vertexOutput); 98 | v_color0 = vertexOutput.color0; 99 | gl_Position = vertexOutput.position; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /materials/ShadowOverlay/ShadowOverlay.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | 4 | vec4 v_color0 : COLOR0; 5 | -------------------------------------------------------------------------------- /materials/ShadowVolume/ShadowVolume.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - STENCIL_WRITE_PASS (not used) 6 | * 7 | * Instancing: 8 | * - INSTANCING__OFF (not used) 9 | * - INSTANCING__ON 10 | */ 11 | 12 | struct NoopSampler { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage2D { 17 | int noop; 18 | }; 19 | 20 | struct NoopImage3D { 21 | int noop; 22 | }; 23 | 24 | struct rayQueryKHR { 25 | int noop; 26 | }; 27 | 28 | struct accelerationStructureKHR { 29 | int noop; 30 | }; 31 | 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | vec3 position; 50 | #ifdef INSTANCING__ON 51 | vec4 instanceData0; 52 | vec4 instanceData1; 53 | vec4 instanceData2; 54 | #endif 55 | }; 56 | 57 | struct VertexOutput { 58 | vec4 position; 59 | }; 60 | 61 | struct FragmentInput { 62 | float dummy; 63 | }; 64 | 65 | struct FragmentOutput { 66 | vec4 Color0; 67 | }; 68 | 69 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 70 | fragOutput.Color0 = vec4(1.0, 1.0, 1.0, 1.0); 71 | } 72 | void main() { 73 | FragmentInput fragmentInput; 74 | FragmentOutput fragmentOutput; 75 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 76 | ViewRect = u_viewRect; 77 | Proj = u_proj; 78 | View = u_view; 79 | ViewTexel = u_viewTexel; 80 | InvView = u_invView; 81 | InvProj = u_invProj; 82 | ViewProj = u_viewProj; 83 | InvViewProj = u_invViewProj; 84 | PrevViewProj = u_prevViewProj; 85 | { 86 | WorldArray[0] = u_model[0]; 87 | WorldArray[1] = u_model[1]; 88 | WorldArray[2] = u_model[2]; 89 | WorldArray[3] = u_model[3]; 90 | } 91 | World = u_model[0]; 92 | WorldView = u_modelView; 93 | WorldViewProj = u_modelViewProj; 94 | PrevWorldPosOffset = u_prevWorldPosOffset; 95 | AlphaRef4 = u_alphaRef4; 96 | AlphaRef = u_alphaRef4.x; 97 | Frag(fragmentInput, fragmentOutput); 98 | gl_FragColor = fragmentOutput.Color0; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /materials/ShadowVolume/ShadowVolume.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | 3 | vec4 i_data1 : TEXCOORD7; 4 | vec4 i_data2 : TEXCOORD6; 5 | vec4 i_data3 : TEXCOORD5; 6 | -------------------------------------------------------------------------------- /materials/SimpleOccluder/SimpleOccluder.ESSL_310.Fragment.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - DEPTH_ONLY_OPAQUE_PASS (not used) 8 | */ 9 | 10 | #if GL_FRAGMENT_PRECISION_HIGH 11 | precision highp float; 12 | #else 13 | precision mediump float; 14 | #endif 15 | #define attribute in 16 | #define varying in 17 | out vec4 bgfx_FragColor; 18 | struct NoopSampler { 19 | int noop; 20 | }; 21 | 22 | struct NoopImage2D { 23 | int noop; 24 | }; 25 | 26 | struct NoopImage3D { 27 | int noop; 28 | }; 29 | 30 | struct rayQueryKHR { 31 | int noop; 32 | }; 33 | 34 | struct accelerationStructureKHR { 35 | int noop; 36 | }; 37 | 38 | uniform vec4 u_viewRect; 39 | uniform mat4 u_proj; 40 | uniform mat4 u_view; 41 | uniform vec4 u_viewTexel; 42 | uniform mat4 u_invView; 43 | uniform mat4 u_invProj; 44 | uniform mat4 u_viewProj; 45 | uniform mat4 u_invViewProj; 46 | uniform mat4 u_prevViewProj; 47 | uniform mat4 u_model[4]; 48 | uniform mat4 u_modelView; 49 | uniform mat4 u_modelViewProj; 50 | uniform vec4 u_prevWorldPosOffset; 51 | uniform vec4 u_alphaRef4; 52 | vec4 ViewRect; 53 | mat4 Proj; 54 | mat4 View; 55 | vec4 ViewTexel; 56 | mat4 InvView; 57 | mat4 InvProj; 58 | mat4 ViewProj; 59 | mat4 InvViewProj; 60 | mat4 PrevViewProj; 61 | mat4 WorldArray[4]; 62 | mat4 World; 63 | mat4 WorldView; 64 | mat4 WorldViewProj; 65 | vec4 PrevWorldPosOffset; 66 | vec4 AlphaRef4; 67 | float AlphaRef; 68 | struct VertexInput { 69 | vec3 position; 70 | }; 71 | 72 | struct VertexOutput { 73 | vec4 position; 74 | }; 75 | 76 | struct FragmentInput { 77 | float dummy; 78 | }; 79 | 80 | struct FragmentOutput { 81 | vec4 Color0; 82 | }; 83 | 84 | void OccluderFrag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 85 | } 86 | void main() { 87 | FragmentInput fragmentInput; 88 | FragmentOutput fragmentOutput; 89 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 90 | ViewRect = u_viewRect; 91 | Proj = u_proj; 92 | View = u_view; 93 | ViewTexel = u_viewTexel; 94 | InvView = u_invView; 95 | InvProj = u_invProj; 96 | ViewProj = u_viewProj; 97 | InvViewProj = u_invViewProj; 98 | PrevViewProj = u_prevViewProj; 99 | { 100 | WorldArray[0] = u_model[0]; 101 | WorldArray[1] = u_model[1]; 102 | WorldArray[2] = u_model[2]; 103 | WorldArray[3] = u_model[3]; 104 | } 105 | World = u_model[0]; 106 | WorldView = u_modelView; 107 | WorldViewProj = u_modelViewProj; 108 | PrevWorldPosOffset = u_prevWorldPosOffset; 109 | AlphaRef4 = u_alphaRef4; 110 | AlphaRef = u_alphaRef4.x; 111 | OccluderFrag(fragmentInput, fragmentOutput); 112 | bgfx_FragColor = fragmentOutput.Color0; 113 | } 114 | 115 | -------------------------------------------------------------------------------- /materials/SimpleOccluder/SimpleOccluder.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - DEPTH_ONLY_OPAQUE_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | vec4 ViewRect; 29 | mat4 Proj; 30 | mat4 View; 31 | vec4 ViewTexel; 32 | mat4 InvView; 33 | mat4 InvProj; 34 | mat4 ViewProj; 35 | mat4 InvViewProj; 36 | mat4 PrevViewProj; 37 | mat4 WorldArray[4]; 38 | mat4 World; 39 | mat4 WorldView; 40 | mat4 WorldViewProj; 41 | vec4 PrevWorldPosOffset; 42 | vec4 AlphaRef4; 43 | float AlphaRef; 44 | struct VertexInput { 45 | vec3 position; 46 | }; 47 | 48 | struct VertexOutput { 49 | vec4 position; 50 | }; 51 | 52 | struct FragmentInput { 53 | float dummy; 54 | }; 55 | 56 | struct FragmentOutput { 57 | vec4 Color0; 58 | }; 59 | 60 | void OccluderFrag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 61 | } 62 | void main() { 63 | FragmentInput fragmentInput; 64 | FragmentOutput fragmentOutput; 65 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 66 | ViewRect = u_viewRect; 67 | Proj = u_proj; 68 | View = u_view; 69 | ViewTexel = u_viewTexel; 70 | InvView = u_invView; 71 | InvProj = u_invProj; 72 | ViewProj = u_viewProj; 73 | InvViewProj = u_invViewProj; 74 | PrevViewProj = u_prevViewProj; 75 | { 76 | WorldArray[0] = u_model[0]; 77 | WorldArray[1] = u_model[1]; 78 | WorldArray[2] = u_model[2]; 79 | WorldArray[3] = u_model[3]; 80 | } 81 | World = u_model[0]; 82 | WorldView = u_modelView; 83 | WorldViewProj = u_modelViewProj; 84 | PrevWorldPosOffset = u_prevWorldPosOffset; 85 | AlphaRef4 = u_alphaRef4; 86 | AlphaRef = u_alphaRef4.x; 87 | OccluderFrag(fragmentInput, fragmentOutput); 88 | gl_FragColor = fragmentOutput.Color0; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /materials/SimpleOccluder/SimpleOccluder.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - DEPTH_ONLY_OPAQUE_PASS (not used) 8 | */ 9 | 10 | #define attribute in 11 | #define varying out 12 | attribute vec3 a_position; 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 u_viewRect; 34 | uniform mat4 u_proj; 35 | uniform mat4 u_view; 36 | uniform vec4 u_viewTexel; 37 | uniform mat4 u_invView; 38 | uniform mat4 u_invProj; 39 | uniform mat4 u_viewProj; 40 | uniform mat4 u_invViewProj; 41 | uniform mat4 u_prevViewProj; 42 | uniform mat4 u_model[4]; 43 | uniform mat4 u_modelView; 44 | uniform mat4 u_modelViewProj; 45 | uniform vec4 u_prevWorldPosOffset; 46 | uniform vec4 u_alphaRef4; 47 | vec4 ViewRect; 48 | mat4 Proj; 49 | mat4 View; 50 | vec4 ViewTexel; 51 | mat4 InvView; 52 | mat4 InvProj; 53 | mat4 ViewProj; 54 | mat4 InvViewProj; 55 | mat4 PrevViewProj; 56 | mat4 WorldArray[4]; 57 | mat4 World; 58 | mat4 WorldView; 59 | mat4 WorldViewProj; 60 | vec4 PrevWorldPosOffset; 61 | vec4 AlphaRef4; 62 | float AlphaRef; 63 | struct VertexInput { 64 | vec3 position; 65 | }; 66 | 67 | struct VertexOutput { 68 | vec4 position; 69 | }; 70 | 71 | struct FragmentInput { 72 | float dummy; 73 | }; 74 | 75 | struct FragmentOutput { 76 | vec4 Color0; 77 | }; 78 | 79 | void OccluderVert(VertexInput vertInput, inout VertexOutput vertOutput) { 80 | vec3 world = ((World) * (vec4(vertInput.position, 1.0))).xyz; 81 | vertOutput.position = ((ViewProj) * (vec4(world, 1.0))); 82 | } 83 | void main() { 84 | VertexInput vertexInput; 85 | VertexOutput vertexOutput; 86 | vertexInput.position = (a_position); 87 | vertexOutput.position = vec4(0, 0, 0, 0); 88 | ViewRect = u_viewRect; 89 | Proj = u_proj; 90 | View = u_view; 91 | ViewTexel = u_viewTexel; 92 | InvView = u_invView; 93 | InvProj = u_invProj; 94 | ViewProj = u_viewProj; 95 | InvViewProj = u_invViewProj; 96 | PrevViewProj = u_prevViewProj; 97 | { 98 | WorldArray[0] = u_model[0]; 99 | WorldArray[1] = u_model[1]; 100 | WorldArray[2] = u_model[2]; 101 | WorldArray[3] = u_model[3]; 102 | } 103 | World = u_model[0]; 104 | WorldView = u_modelView; 105 | WorldViewProj = u_modelViewProj; 106 | PrevWorldPosOffset = u_prevWorldPosOffset; 107 | AlphaRef4 = u_alphaRef4; 108 | AlphaRef = u_alphaRef4.x; 109 | OccluderVert(vertexInput, vertexOutput); 110 | gl_Position = vertexOutput.position; 111 | } 112 | 113 | -------------------------------------------------------------------------------- /materials/SimpleOccluder/SimpleOccluder.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - DEPTH_ONLY_OPAQUE_PASS (not used) 6 | */ 7 | 8 | $input a_position 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | vec4 ViewRect; 30 | mat4 Proj; 31 | mat4 View; 32 | vec4 ViewTexel; 33 | mat4 InvView; 34 | mat4 InvProj; 35 | mat4 ViewProj; 36 | mat4 InvViewProj; 37 | mat4 PrevViewProj; 38 | mat4 WorldArray[4]; 39 | mat4 World; 40 | mat4 WorldView; 41 | mat4 WorldViewProj; 42 | vec4 PrevWorldPosOffset; 43 | vec4 AlphaRef4; 44 | float AlphaRef; 45 | struct VertexInput { 46 | vec3 position; 47 | }; 48 | 49 | struct VertexOutput { 50 | vec4 position; 51 | }; 52 | 53 | struct FragmentInput { 54 | float dummy; 55 | }; 56 | 57 | struct FragmentOutput { 58 | vec4 Color0; 59 | }; 60 | 61 | void OccluderVert(VertexInput vertInput, inout VertexOutput vertOutput) { 62 | vec3 world = ((World) * (vec4(vertInput.position, 1.0))).xyz; // Attention! 63 | vertOutput.position = ((ViewProj) * (vec4(world, 1.0))); // Attention! 64 | } 65 | void main() { 66 | VertexInput vertexInput; 67 | VertexOutput vertexOutput; 68 | vertexInput.position = (a_position); 69 | vertexOutput.position = vec4(0, 0, 0, 0); 70 | ViewRect = u_viewRect; 71 | Proj = u_proj; 72 | View = u_view; 73 | ViewTexel = u_viewTexel; 74 | InvView = u_invView; 75 | InvProj = u_invProj; 76 | ViewProj = u_viewProj; 77 | InvViewProj = u_invViewProj; 78 | PrevViewProj = u_prevViewProj; 79 | { 80 | WorldArray[0] = u_model[0]; 81 | WorldArray[1] = u_model[1]; 82 | WorldArray[2] = u_model[2]; 83 | WorldArray[3] = u_model[3]; 84 | } 85 | World = u_model[0]; 86 | WorldView = u_modelView; 87 | WorldViewProj = u_modelViewProj; 88 | PrevWorldPosOffset = u_prevWorldPosOffset; 89 | AlphaRef4 = u_alphaRef4; 90 | AlphaRef = u_alphaRef4.x; 91 | OccluderVert(vertexInput, vertexOutput); 92 | gl_Position = vertexOutput.position; 93 | } 94 | 95 | -------------------------------------------------------------------------------- /materials/SimpleOccluder/SimpleOccluder.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | -------------------------------------------------------------------------------- /materials/Sky/Sky.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec2 v_texcoord0 : TEXCOORD0; 11 | vec3 v_worldPos : TEXCOORD3; 12 | -------------------------------------------------------------------------------- /materials/SkyProbeDeferredShading/SkyProbeDeferredShading.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec3 v_projPosition : COLOR1; 5 | vec2 v_texcoord0 : TEXCOORD0; 6 | -------------------------------------------------------------------------------- /materials/SpecularConvolution/SpecularConvolution.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_position : POSITION; 2 | #ifdef CONVOLVE_PASS 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | #endif 5 | 6 | vec2 v_texCoord : TEXCOORD0; 7 | -------------------------------------------------------------------------------- /materials/StandardRed/StandardRed.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec4 a_normal : NORMAL; 3 | vec3 a_position : POSITION; 4 | vec2 a_texcoord0 : TEXCOORD0; 5 | 6 | vec4 i_data1 : TEXCOORD7; 7 | vec4 i_data2 : TEXCOORD6; 8 | vec4 i_data3 : TEXCOORD5; 9 | 10 | vec4 v_color0 : COLOR0; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_viewSpaceNormal : NORMAL; 13 | #ifndef CUSTOM_PASS_BASED_ON_OPAQUE_PASS 14 | vec4 v_viewSpacePosition : COLOR1; 15 | #endif 16 | vec3 v_worldPos : TEXCOORD3; 17 | -------------------------------------------------------------------------------- /materials/Stars/Stars.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec2 v_texcoord0 : TEXCOORD0; 11 | vec3 v_worldPos : TEXCOORD3; 12 | -------------------------------------------------------------------------------- /materials/StarsForwardPBR/StarsForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec3 v_ndcPosition : COLOR1; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_worldPos : TEXCOORD3; 13 | -------------------------------------------------------------------------------- /materials/SunMoon/SunMoon.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec2 v_texcoord0 : TEXCOORD0; 11 | vec3 v_worldPos : TEXCOORD3; 12 | -------------------------------------------------------------------------------- /materials/SunMoonForwardPBR/SunMoonForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec3 v_ndcPosition : COLOR1; 11 | vec2 v_texcoord0 : TEXCOORD0; 12 | vec3 v_worldPos : TEXCOORD3; 13 | -------------------------------------------------------------------------------- /materials/UIBase/UIBase.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | struct NoopSampler { 9 | int noop; 10 | }; 11 | 12 | struct NoopImage2D { 13 | int noop; 14 | }; 15 | 16 | struct NoopImage3D { 17 | int noop; 18 | }; 19 | 20 | struct rayQueryKHR { 21 | int noop; 22 | }; 23 | 24 | struct accelerationStructureKHR { 25 | int noop; 26 | }; 27 | 28 | uniform vec4 HudOpacity; 29 | uniform vec4 TintColor; 30 | vec4 ViewRect; 31 | mat4 Proj; 32 | mat4 View; 33 | vec4 ViewTexel; 34 | mat4 InvView; 35 | mat4 InvProj; 36 | mat4 ViewProj; 37 | mat4 InvViewProj; 38 | mat4 PrevViewProj; 39 | mat4 WorldArray[4]; 40 | mat4 World; 41 | mat4 WorldView; 42 | mat4 WorldViewProj; 43 | vec4 PrevWorldPosOffset; 44 | vec4 AlphaRef4; 45 | float AlphaRef; 46 | struct VertexInput { 47 | vec3 position; 48 | }; 49 | 50 | struct VertexOutput { 51 | vec4 position; 52 | }; 53 | 54 | struct FragmentInput { 55 | float dummy; 56 | }; 57 | 58 | struct FragmentOutput { 59 | vec4 Color0; 60 | }; 61 | 62 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 63 | vec4 diffuse = TintColor; 64 | diffuse.a = diffuse.a * HudOpacity.x; 65 | fragOutput.Color0 = diffuse; 66 | } 67 | void main() { 68 | FragmentInput fragmentInput; 69 | FragmentOutput fragmentOutput; 70 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Frag(fragmentInput, fragmentOutput); 93 | gl_FragColor = fragmentOutput.Color0; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/UIBase/UIBase.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - TRANSPARENT_PASS (not used) 8 | */ 9 | 10 | #define attribute in 11 | #define varying out 12 | attribute vec3 a_position; 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 u_viewRect; 34 | uniform mat4 u_proj; 35 | uniform mat4 u_view; 36 | uniform vec4 u_viewTexel; 37 | uniform mat4 u_invView; 38 | uniform mat4 u_invProj; 39 | uniform mat4 u_viewProj; 40 | uniform mat4 u_invViewProj; 41 | uniform mat4 u_prevViewProj; 42 | uniform mat4 u_model[4]; 43 | uniform mat4 u_modelView; 44 | uniform mat4 u_modelViewProj; 45 | uniform vec4 u_prevWorldPosOffset; 46 | uniform vec4 u_alphaRef4; 47 | uniform vec4 HudOpacity; 48 | uniform vec4 TintColor; 49 | vec4 ViewRect; 50 | mat4 Proj; 51 | mat4 View; 52 | vec4 ViewTexel; 53 | mat4 InvView; 54 | mat4 InvProj; 55 | mat4 ViewProj; 56 | mat4 InvViewProj; 57 | mat4 PrevViewProj; 58 | mat4 WorldArray[4]; 59 | mat4 World; 60 | mat4 WorldView; 61 | mat4 WorldViewProj; 62 | vec4 PrevWorldPosOffset; 63 | vec4 AlphaRef4; 64 | float AlphaRef; 65 | struct VertexInput { 66 | vec3 position; 67 | }; 68 | 69 | struct VertexOutput { 70 | vec4 position; 71 | }; 72 | 73 | struct FragmentInput { 74 | float dummy; 75 | }; 76 | 77 | struct FragmentOutput { 78 | vec4 Color0; 79 | }; 80 | 81 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 82 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); 83 | } 84 | void main() { 85 | VertexInput vertexInput; 86 | VertexOutput vertexOutput; 87 | vertexInput.position = (a_position); 88 | vertexOutput.position = vec4(0, 0, 0, 0); 89 | ViewRect = u_viewRect; 90 | Proj = u_proj; 91 | View = u_view; 92 | ViewTexel = u_viewTexel; 93 | InvView = u_invView; 94 | InvProj = u_invProj; 95 | ViewProj = u_viewProj; 96 | InvViewProj = u_invViewProj; 97 | PrevViewProj = u_prevViewProj; 98 | { 99 | WorldArray[0] = u_model[0]; 100 | WorldArray[1] = u_model[1]; 101 | WorldArray[2] = u_model[2]; 102 | WorldArray[3] = u_model[3]; 103 | } 104 | World = u_model[0]; 105 | WorldView = u_modelView; 106 | WorldViewProj = u_modelViewProj; 107 | PrevWorldPosOffset = u_prevWorldPosOffset; 108 | AlphaRef4 = u_alphaRef4; 109 | AlphaRef = u_alphaRef4.x; 110 | Vert(vertexInput, vertexOutput); 111 | gl_Position = vertexOutput.position; 112 | } 113 | 114 | -------------------------------------------------------------------------------- /materials/UIBase/UIBase.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_position 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 HudOpacity; 30 | uniform vec4 TintColor; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 64 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 65 | } 66 | void main() { 67 | VertexInput vertexInput; 68 | VertexOutput vertexOutput; 69 | vertexInput.position = (a_position); 70 | vertexOutput.position = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Vert(vertexInput, vertexOutput); 93 | gl_Position = vertexOutput.position; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/UIBase/UIBase.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | -------------------------------------------------------------------------------- /materials/UIBlit/UIBlit.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 HudOpacity; 31 | uniform vec4 TintColor; 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | vec3 position; 50 | vec2 texcoord0; 51 | }; 52 | 53 | struct VertexOutput { 54 | vec4 position; 55 | vec2 texcoord0; 56 | }; 57 | 58 | struct FragmentInput { 59 | vec2 texcoord0; 60 | }; 61 | 62 | struct FragmentOutput { 63 | vec4 Color0; 64 | }; 65 | 66 | SAMPLER2D_AUTOREG(s_MatTexture); 67 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 68 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 69 | vertOutput.texcoord0 = vertInput.texcoord0; 70 | } 71 | void main() { 72 | VertexInput vertexInput; 73 | VertexOutput vertexOutput; 74 | vertexInput.position = (a_position); 75 | vertexInput.texcoord0 = (a_texcoord0); 76 | vertexOutput.texcoord0 = vec2(0, 0); 77 | vertexOutput.position = vec4(0, 0, 0, 0); 78 | ViewRect = u_viewRect; 79 | Proj = u_proj; 80 | View = u_view; 81 | ViewTexel = u_viewTexel; 82 | InvView = u_invView; 83 | InvProj = u_invProj; 84 | ViewProj = u_viewProj; 85 | InvViewProj = u_invViewProj; 86 | PrevViewProj = u_prevViewProj; 87 | { 88 | WorldArray[0] = u_model[0]; 89 | WorldArray[1] = u_model[1]; 90 | WorldArray[2] = u_model[2]; 91 | WorldArray[3] = u_model[3]; 92 | } 93 | World = u_model[0]; 94 | WorldView = u_modelView; 95 | WorldViewProj = u_modelViewProj; 96 | PrevWorldPosOffset = u_prevWorldPosOffset; 97 | AlphaRef4 = u_alphaRef4; 98 | AlphaRef = u_alphaRef4.x; 99 | Vert(vertexInput, vertexOutput); 100 | v_texcoord0 = vertexOutput.texcoord0; 101 | gl_Position = vertexOutput.position; 102 | } 103 | 104 | -------------------------------------------------------------------------------- /materials/UIBlit/UIBlit.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/UIFill/UIFill.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input v_color0 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 HudOpacity; 30 | uniform vec4 TintColor; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec4 color0; 49 | vec3 position; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | vec4 color0; 55 | }; 56 | 57 | struct FragmentInput { 58 | vec4 color0; 59 | }; 60 | 61 | struct FragmentOutput { 62 | vec4 Color0; 63 | }; 64 | 65 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 66 | vec4 diffuse = fragInput.color0 * TintColor; 67 | diffuse.a = diffuse.a * HudOpacity.x; 68 | fragOutput.Color0 *= diffuse; 69 | } 70 | void main() { 71 | FragmentInput fragmentInput; 72 | FragmentOutput fragmentOutput; 73 | fragmentInput.color0 = v_color0; 74 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 75 | ViewRect = u_viewRect; 76 | Proj = u_proj; 77 | View = u_view; 78 | ViewTexel = u_viewTexel; 79 | InvView = u_invView; 80 | InvProj = u_invProj; 81 | ViewProj = u_viewProj; 82 | InvViewProj = u_invViewProj; 83 | PrevViewProj = u_prevViewProj; 84 | { 85 | WorldArray[0] = u_model[0]; 86 | WorldArray[1] = u_model[1]; 87 | WorldArray[2] = u_model[2]; 88 | WorldArray[3] = u_model[3]; 89 | } 90 | World = u_model[0]; 91 | WorldView = u_modelView; 92 | WorldViewProj = u_modelViewProj; 93 | PrevWorldPosOffset = u_prevWorldPosOffset; 94 | AlphaRef4 = u_alphaRef4; 95 | AlphaRef = u_alphaRef4.x; 96 | Frag(fragmentInput, fragmentOutput); 97 | gl_FragColor = fragmentOutput.Color0; 98 | } 99 | 100 | -------------------------------------------------------------------------------- /materials/UIFill/UIFill.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - TRANSPARENT_PASS (not used) 6 | */ 7 | 8 | $input a_color0, a_position 9 | $output v_color0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 HudOpacity; 31 | uniform vec4 TintColor; 32 | vec4 ViewRect; 33 | mat4 Proj; 34 | mat4 View; 35 | vec4 ViewTexel; 36 | mat4 InvView; 37 | mat4 InvProj; 38 | mat4 ViewProj; 39 | mat4 InvViewProj; 40 | mat4 PrevViewProj; 41 | mat4 WorldArray[4]; 42 | mat4 World; 43 | mat4 WorldView; 44 | mat4 WorldViewProj; 45 | vec4 PrevWorldPosOffset; 46 | vec4 AlphaRef4; 47 | float AlphaRef; 48 | struct VertexInput { 49 | vec4 color0; 50 | vec3 position; 51 | }; 52 | 53 | struct VertexOutput { 54 | vec4 position; 55 | vec4 color0; 56 | }; 57 | 58 | struct FragmentInput { 59 | vec4 color0; 60 | }; 61 | 62 | struct FragmentOutput { 63 | vec4 Color0; 64 | }; 65 | 66 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 67 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position, 1.0))); // Attention! 68 | vertOutput.color0 = vertInput.color0; 69 | } 70 | void main() { 71 | VertexInput vertexInput; 72 | VertexOutput vertexOutput; 73 | vertexInput.color0 = (a_color0); 74 | vertexInput.position = (a_position); 75 | vertexOutput.color0 = vec4(0, 0, 0, 0); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | v_color0 = vertexOutput.color0; 100 | gl_Position = vertexOutput.position; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /materials/UIFill/UIFill.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | 4 | vec4 v_color0 : COLOR0; 5 | -------------------------------------------------------------------------------- /materials/UIGlint/UIGlint.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 v_color : COLOR0; 6 | vec2 v_layer1UV : TEXCOORD1; 7 | vec2 v_layer2UV : TEXCOORD2; 8 | vec2 v_texcoord0 : TEXCOORD0; 9 | -------------------------------------------------------------------------------- /materials/UISprite/UISprite.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 v_color0 : COLOR0; 6 | vec2 v_texcoord0 : TEXCOORD0; 7 | -------------------------------------------------------------------------------- /materials/UIText/UIText.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 v_color0 : COLOR0; 6 | vec4 v_linearClampBounds : TEXCOORD1; 7 | vec2 v_texcoord0 : TEXCOORD0; 8 | -------------------------------------------------------------------------------- /materials/Upscaling/Upscaling.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | -------------------------------------------------------------------------------- /materials/VolumeScattering/VolumeScattering.ESSL_310.Fragment.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - SCATTERING_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 VolumeDimensions; 30 | uniform vec4 VolumeNearFar; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | float dummy; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | IMAGE2D_ARRAY_RO_AUTOREG(s_LightingBuffer, rgba16f); 64 | IMAGE2D_ARRAY_WR_AUTOREG(s_ScatteringBuffer, rgba16f); 65 | void Frag(FragmentInput fragInput, inout FragmentOutput fragOutput) { 66 | fragOutput.Color0 = vec4(0.0, 0.0, 0.0, 0.0); 67 | } 68 | void main() { 69 | FragmentInput fragmentInput; 70 | FragmentOutput fragmentOutput; 71 | fragmentOutput.Color0 = vec4(0, 0, 0, 0); 72 | ViewRect = u_viewRect; 73 | Proj = u_proj; 74 | View = u_view; 75 | ViewTexel = u_viewTexel; 76 | InvView = u_invView; 77 | InvProj = u_invProj; 78 | ViewProj = u_viewProj; 79 | InvViewProj = u_invViewProj; 80 | PrevViewProj = u_prevViewProj; 81 | { 82 | WorldArray[0] = u_model[0]; 83 | WorldArray[1] = u_model[1]; 84 | WorldArray[2] = u_model[2]; 85 | WorldArray[3] = u_model[3]; 86 | } 87 | World = u_model[0]; 88 | WorldView = u_modelView; 89 | WorldViewProj = u_modelViewProj; 90 | PrevWorldPosOffset = u_prevWorldPosOffset; 91 | AlphaRef4 = u_alphaRef4; 92 | AlphaRef = u_alphaRef4.x; 93 | Frag(fragmentInput, fragmentOutput); 94 | gl_FragColor = fragmentOutput.Color0; 95 | } 96 | 97 | -------------------------------------------------------------------------------- /materials/VolumeScattering/VolumeScattering.ESSL_310.Vertex.glsl: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | /* 4 | * Available Macros: 5 | * 6 | * Passes: 7 | * - FALLBACK_PASS (not used) 8 | * - SCATTERING_PASS (not used) 9 | */ 10 | 11 | #define attribute in 12 | #define varying out 13 | struct NoopSampler { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage2D { 18 | int noop; 19 | }; 20 | 21 | struct NoopImage3D { 22 | int noop; 23 | }; 24 | 25 | struct rayQueryKHR { 26 | int noop; 27 | }; 28 | 29 | struct accelerationStructureKHR { 30 | int noop; 31 | }; 32 | 33 | uniform vec4 u_viewRect; 34 | uniform mat4 u_proj; 35 | uniform mat4 u_view; 36 | uniform vec4 u_viewTexel; 37 | uniform mat4 u_invView; 38 | uniform mat4 u_invProj; 39 | uniform mat4 u_viewProj; 40 | uniform mat4 u_invViewProj; 41 | uniform mat4 u_prevViewProj; 42 | uniform mat4 u_model[4]; 43 | uniform mat4 u_modelView; 44 | uniform mat4 u_modelViewProj; 45 | uniform vec4 u_prevWorldPosOffset; 46 | uniform vec4 u_alphaRef4; 47 | uniform vec4 VolumeDimensions; 48 | uniform vec4 VolumeNearFar; 49 | vec4 ViewRect; 50 | mat4 Proj; 51 | mat4 View; 52 | vec4 ViewTexel; 53 | mat4 InvView; 54 | mat4 InvProj; 55 | mat4 ViewProj; 56 | mat4 InvViewProj; 57 | mat4 PrevViewProj; 58 | mat4 WorldArray[4]; 59 | mat4 World; 60 | mat4 WorldView; 61 | mat4 WorldViewProj; 62 | vec4 PrevWorldPosOffset; 63 | vec4 AlphaRef4; 64 | float AlphaRef; 65 | struct VertexInput { 66 | float dummy; 67 | }; 68 | 69 | struct VertexOutput { 70 | vec4 position; 71 | }; 72 | 73 | struct FragmentInput { 74 | float dummy; 75 | }; 76 | 77 | struct FragmentOutput { 78 | vec4 Color0; 79 | }; 80 | 81 | layout(rgba16f, binding = 0)readonly uniform highp image2DArray s_LightingBuffer; 82 | layout(rgba16f, binding = 1)writeonly uniform highp image2DArray s_ScatteringBuffer; 83 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 84 | } 85 | void main() { 86 | VertexInput vertexInput; 87 | VertexOutput vertexOutput; 88 | vertexOutput.position = vec4(0, 0, 0, 0); 89 | ViewRect = u_viewRect; 90 | Proj = u_proj; 91 | View = u_view; 92 | ViewTexel = u_viewTexel; 93 | InvView = u_invView; 94 | InvProj = u_invProj; 95 | ViewProj = u_viewProj; 96 | InvViewProj = u_invViewProj; 97 | PrevViewProj = u_prevViewProj; 98 | { 99 | WorldArray[0] = u_model[0]; 100 | WorldArray[1] = u_model[1]; 101 | WorldArray[2] = u_model[2]; 102 | WorldArray[3] = u_model[3]; 103 | } 104 | World = u_model[0]; 105 | WorldView = u_modelView; 106 | WorldViewProj = u_modelViewProj; 107 | PrevWorldPosOffset = u_prevWorldPosOffset; 108 | AlphaRef4 = u_alphaRef4; 109 | AlphaRef = u_alphaRef4.x; 110 | Vert(vertexInput, vertexOutput); 111 | gl_Position = vertexOutput.position; 112 | } 113 | 114 | -------------------------------------------------------------------------------- /materials/VolumeScattering/VolumeScattering.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - FALLBACK_PASS (not used) 6 | * - SCATTERING_PASS (not used) 7 | */ 8 | 9 | struct NoopSampler { 10 | int noop; 11 | }; 12 | 13 | struct NoopImage2D { 14 | int noop; 15 | }; 16 | 17 | struct NoopImage3D { 18 | int noop; 19 | }; 20 | 21 | struct rayQueryKHR { 22 | int noop; 23 | }; 24 | 25 | struct accelerationStructureKHR { 26 | int noop; 27 | }; 28 | 29 | uniform vec4 VolumeDimensions; 30 | uniform vec4 VolumeNearFar; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | float dummy; 49 | }; 50 | 51 | struct VertexOutput { 52 | vec4 position; 53 | }; 54 | 55 | struct FragmentInput { 56 | float dummy; 57 | }; 58 | 59 | struct FragmentOutput { 60 | vec4 Color0; 61 | }; 62 | 63 | IMAGE2D_ARRAY_RO_AUTOREG(s_LightingBuffer, rgba16f); 64 | IMAGE2D_ARRAY_WR_AUTOREG(s_ScatteringBuffer, rgba16f); 65 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 66 | } 67 | void main() { 68 | VertexInput vertexInput; 69 | VertexOutput vertexOutput; 70 | vertexOutput.position = vec4(0, 0, 0, 0); 71 | ViewRect = u_viewRect; 72 | Proj = u_proj; 73 | View = u_view; 74 | ViewTexel = u_viewTexel; 75 | InvView = u_invView; 76 | InvProj = u_invProj; 77 | ViewProj = u_viewProj; 78 | InvViewProj = u_invViewProj; 79 | PrevViewProj = u_prevViewProj; 80 | { 81 | WorldArray[0] = u_model[0]; 82 | WorldArray[1] = u_model[1]; 83 | WorldArray[2] = u_model[2]; 84 | WorldArray[3] = u_model[3]; 85 | } 86 | World = u_model[0]; 87 | WorldView = u_modelView; 88 | WorldViewProj = u_modelViewProj; 89 | PrevWorldPosOffset = u_prevWorldPosOffset; 90 | AlphaRef4 = u_alphaRef4; 91 | AlphaRef = u_alphaRef4.x; 92 | Vert(vertexInput, vertexOutput); 93 | gl_Position = vertexOutput.position; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /materials/WaterForwardPBR/WaterForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec2 a_texcoord1 : TEXCOORD1; 3 | vec4 a_normal : NORMAL; 4 | #if defined(DO_WATER_SHADING_PASS) || defined(DO_WATER_SURFACE_BUFFER_PASS) 5 | int a_texcoord4 : TEXCOORD4; 6 | #endif 7 | vec3 a_position : POSITION; 8 | vec4 a_tangent : TANGENT; 9 | vec2 a_texcoord0 : TEXCOORD0; 10 | 11 | vec4 i_data1 : TEXCOORD7; 12 | vec4 i_data2 : TEXCOORD6; 13 | vec4 i_data3 : TEXCOORD5; 14 | 15 | vec3 v_bitangent : BITANGENT; 16 | vec4 v_color0 : COLOR0; 17 | #if defined(DO_WATER_SHADING_PASS) || defined(DO_WATER_SURFACE_BUFFER_PASS) 18 | flat int v_frontFacing : FRONTFACING; 19 | #endif 20 | vec2 v_lightmapUV : TEXCOORD1; 21 | vec3 v_normal : NORMAL; 22 | #if defined(DO_WATER_SHADING_PASS) || defined(DO_WATER_SURFACE_BUFFER_PASS) 23 | flat int v_pbrTextureId : TEXCOORD4; 24 | #endif 25 | vec3 v_tangent : TANGENT; 26 | centroid vec2 v_texcoord0 : TEXCOORD0; 27 | vec3 v_worldPos : TEXCOORD3; 28 | -------------------------------------------------------------------------------- /materials/Weather/Weather.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec4 v_fog : COLOR1; 11 | float v_occlusionHeight : TEXCOORD2; 12 | vec2 v_occlusionUV : TEXCOORD1; 13 | vec2 v_texcoord0 : TEXCOORD0; 14 | vec3 v_worldPos : TEXCOORD3; 15 | -------------------------------------------------------------------------------- /materials/WeatherForwardPBR/WeatherForwardPBR.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 a_color0 : COLOR0; 2 | vec3 a_position : POSITION; 3 | vec2 a_texcoord0 : TEXCOORD0; 4 | 5 | vec4 i_data1 : TEXCOORD7; 6 | vec4 i_data2 : TEXCOORD6; 7 | vec4 i_data3 : TEXCOORD5; 8 | 9 | vec4 v_color0 : COLOR0; 10 | vec4 v_fog : COLOR1; 11 | #ifdef FORWARD_PBR_TRANSPARENT_PASS 12 | vec3 v_ndcPosition : COLOR2; 13 | #endif 14 | float v_occlusionHeight : TEXCOORD2; 15 | vec2 v_occlusionUV : TEXCOORD1; 16 | vec2 v_texcoord0 : TEXCOORD0; 17 | vec3 v_worldPos : TEXCOORD3; 18 | -------------------------------------------------------------------------------- /materials/displaymap/displaymap.ESSL_310.Vertex.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Available Macros: 3 | * 4 | * Passes: 5 | * - BLEND_PASS (not used) 6 | */ 7 | 8 | $input a_position, a_texcoord0 9 | $output v_texcoord0 10 | struct NoopSampler { 11 | int noop; 12 | }; 13 | 14 | struct NoopImage2D { 15 | int noop; 16 | }; 17 | 18 | struct NoopImage3D { 19 | int noop; 20 | }; 21 | 22 | struct rayQueryKHR { 23 | int noop; 24 | }; 25 | 26 | struct accelerationStructureKHR { 27 | int noop; 28 | }; 29 | 30 | uniform vec4 PaperWhite; 31 | vec4 ViewRect; 32 | mat4 Proj; 33 | mat4 View; 34 | vec4 ViewTexel; 35 | mat4 InvView; 36 | mat4 InvProj; 37 | mat4 ViewProj; 38 | mat4 InvViewProj; 39 | mat4 PrevViewProj; 40 | mat4 WorldArray[4]; 41 | mat4 World; 42 | mat4 WorldView; 43 | mat4 WorldViewProj; 44 | vec4 PrevWorldPosOffset; 45 | vec4 AlphaRef4; 46 | float AlphaRef; 47 | struct VertexInput { 48 | vec3 position; 49 | vec2 texcoord0; 50 | }; 51 | 52 | struct VertexOutput { 53 | vec4 position; 54 | vec2 texcoord0; 55 | }; 56 | 57 | struct FragmentInput { 58 | vec2 texcoord0; 59 | }; 60 | 61 | struct FragmentOutput { 62 | vec4 Color0; 63 | }; 64 | 65 | SAMPLER2D_AUTOREG(s_TexColor); 66 | void Vert(VertexInput vertInput, inout VertexOutput vertOutput) { 67 | vertOutput.position = ((WorldViewProj) * (vec4(vertInput.position.xyz, 1.0))); // Attention! 68 | vertOutput.texcoord0 = vertInput.texcoord0; 69 | } 70 | void main() { 71 | VertexInput vertexInput; 72 | VertexOutput vertexOutput; 73 | vertexInput.position = (a_position); 74 | vertexInput.texcoord0 = (a_texcoord0); 75 | vertexOutput.texcoord0 = vec2(0, 0); 76 | vertexOutput.position = vec4(0, 0, 0, 0); 77 | ViewRect = u_viewRect; 78 | Proj = u_proj; 79 | View = u_view; 80 | ViewTexel = u_viewTexel; 81 | InvView = u_invView; 82 | InvProj = u_invProj; 83 | ViewProj = u_viewProj; 84 | InvViewProj = u_invViewProj; 85 | PrevViewProj = u_prevViewProj; 86 | { 87 | WorldArray[0] = u_model[0]; 88 | WorldArray[1] = u_model[1]; 89 | WorldArray[2] = u_model[2]; 90 | WorldArray[3] = u_model[3]; 91 | } 92 | World = u_model[0]; 93 | WorldView = u_modelView; 94 | WorldViewProj = u_modelViewProj; 95 | PrevWorldPosOffset = u_prevWorldPosOffset; 96 | AlphaRef4 = u_alphaRef4; 97 | AlphaRef = u_alphaRef4.x; 98 | Vert(vertexInput, vertexOutput); 99 | v_texcoord0 = vertexOutput.texcoord0; 100 | gl_Position = vertexOutput.position; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /materials/displaymap/displaymap.varying.def.sc: -------------------------------------------------------------------------------- 1 | vec3 a_position : POSITION; 2 | vec2 a_texcoord0 : TEXCOORD0; 3 | 4 | vec2 v_texcoord0 : TEXCOORD0; 5 | --------------------------------------------------------------------------------