├── .clang-format ├── .gitattributes ├── .github └── workflows │ └── push-continous-delivery.yml ├── .gitignore ├── .gitmodules ├── CONTRIBUTORS.md ├── Examples └── fpsTest │ ├── Resources │ ├── Meshes │ │ ├── Floor.mesh │ │ ├── Mesh_0.mesh │ │ ├── Mesh_1.mesh │ │ └── Sphere.mesh │ └── Textures │ │ ├── RedBarrel_D.jpg │ │ ├── RedBarrel_N.jpg │ │ ├── RedBarrel_R.jpg │ │ ├── RedBarrel_S.jpg │ │ ├── TileD.png │ │ ├── TileM.png │ │ ├── TileN.png │ │ ├── TileR.png │ │ ├── albedo.png │ │ ├── albedo0.png │ │ ├── metallic.png │ │ ├── metallic0.png │ │ ├── normal.png │ │ ├── normal0.png │ │ ├── roughness.png │ │ └── roughness0.png │ └── fpsTest.json ├── LICENSE ├── README.md ├── Resources └── Testing │ ├── Animation │ └── bob │ │ ├── Readme.txt │ │ ├── bob_body.tga │ │ ├── bob_body_h.tga │ │ ├── bob_body_local.tga │ │ ├── bob_body_s.tga │ │ ├── bob_head.tga │ │ ├── bob_head_h.tga │ │ ├── bob_head_local.tga │ │ ├── bob_head_s.tga │ │ ├── bob_helmet.tga │ │ ├── bob_helmet_h.tga │ │ ├── bob_helmet_local.tga │ │ ├── bob_helmet_s.tga │ │ ├── bob_lamp_update.blend │ │ ├── bob_lamp_update.md5anim │ │ ├── bob_lamp_update_export.blend │ │ ├── bob_lamp_update_export.md5anim │ │ ├── bob_lamp_update_export.md5mesh │ │ ├── lantern.tga │ │ ├── lantern_h.tga │ │ ├── lantern_local.tga │ │ ├── lantern_top.tga │ │ ├── lantern_top_h.tga │ │ └── lantern_top_local.tga │ ├── IBL │ ├── apartment.hdr │ ├── apartment_env.hdr │ ├── autoshop_01_2k.hdr │ ├── office.hdr │ └── office_env.hdr │ ├── PBR │ ├── iron │ │ ├── albedo.png │ │ ├── metallic.png │ │ ├── normal.png │ │ └── roughness.png │ └── scratch │ │ ├── albedo.png │ │ ├── metallic.png │ │ ├── normal.png │ │ └── roughness.png │ └── Sound │ └── SampleSound.ogg ├── build.gradle ├── distZip ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main ├── java ├── de │ └── jarnbjo │ │ ├── ogg │ │ ├── BasicStream.java │ │ ├── CachedUrlStream.java │ │ ├── EndOfOggStreamException.java │ │ ├── FileStream.java │ │ ├── LogicalOggStream.java │ │ ├── LogicalOggStreamImpl.java │ │ ├── OggFormatException.java │ │ ├── OggPage.java │ │ ├── OnDemandUrlStream.java │ │ ├── PhysicalOggStream.java │ │ └── UncachedUrlStream.java │ │ ├── util │ │ ├── audio │ │ │ └── FadeableAudioInputStream.java │ │ └── io │ │ │ ├── BitInputStream.java │ │ │ ├── ByteArrayBitInputStream.java │ │ │ └── HuffmanNode.java │ │ └── vorbis │ │ ├── AudioPacket.java │ │ ├── CodeBook.java │ │ ├── CommentHeader.java │ │ ├── Floor.java │ │ ├── Floor0.java │ │ ├── Floor1.java │ │ ├── IdentificationHeader.java │ │ ├── Mapping.java │ │ ├── Mapping0.java │ │ ├── MdctFloat.java │ │ ├── Mode.java │ │ ├── Residue.java │ │ ├── Residue0.java │ │ ├── Residue1.java │ │ ├── Residue2.java │ │ ├── SetupHeader.java │ │ ├── Util.java │ │ ├── VorbisAudioFileReader.java │ │ ├── VorbisFormatException.java │ │ └── VorbisStream.java ├── engine │ ├── ClientEngine.java │ ├── ClientEngineUI.java │ ├── ClientLocalRunner.java │ ├── ClientRunner.java │ ├── ClientServerRunner.java │ ├── FileFormats.java │ ├── FilePath.java │ ├── Game.java │ ├── GameSubscriber.java │ ├── IEngineThread.java │ ├── InternalGameThread.java │ ├── InternalRenderThread.java │ ├── al │ │ └── InternalSoundService.java │ ├── gl │ │ ├── DeferredPass.java │ │ ├── DeferredPipeline.java │ │ ├── DisplayUtils.java │ │ ├── EnvironmentRenderer.java │ │ ├── GLRenderer.java │ │ ├── GLResourceLoader.java │ │ ├── GLResourcesManagerBackend.java │ │ ├── GPUProfiler.java │ │ ├── GPUTaskProfile.java │ │ ├── HandlesRenderer.java │ │ ├── IDeferredPipeline.java │ │ ├── IObjectRenderer.java │ │ ├── IPipeline.java │ │ ├── IRenderingData.java │ │ ├── IrradianceCapture.java │ │ ├── Maths.java │ │ ├── PipelinePass.java │ │ ├── PostProcesPass.java │ │ ├── PostProcessPipeline.java │ │ ├── PreFilteredEnvironment.java │ │ ├── RendererData.java │ │ ├── RenderingManager.java │ │ ├── RenderingSettings.java │ │ ├── Resources.java │ │ ├── SkyRenderer.java │ │ ├── Sun.java │ │ ├── VoxelizedManager.java │ │ ├── compute │ │ │ ├── AOBlur.java │ │ │ ├── BaseComputeShader.java │ │ │ ├── ColorCorrection.java │ │ │ ├── ComputeAO.java │ │ │ ├── ComputeMultiPass.java │ │ │ ├── ComputePass.java │ │ │ ├── ComputePipeline.java │ │ │ ├── HBAO.java │ │ │ ├── Lighting.java │ │ │ ├── MotionBlur.java │ │ │ ├── SSDO.java │ │ │ ├── TAA.java │ │ │ └── shaders │ │ │ │ ├── AOBlurShader.java │ │ │ │ ├── ColorCorrectionShader.java │ │ │ │ ├── HBAOShader.java │ │ │ │ ├── LightingShader.java │ │ │ │ ├── MotionBlurShader.java │ │ │ │ ├── SSDOShader.java │ │ │ │ └── TAAShader.java │ │ ├── entities │ │ │ ├── CubeMapCamera.java │ │ │ └── LayeredCubeCamera.java │ │ ├── exceptions │ │ │ ├── CompileShaderException.java │ │ │ ├── DecodeTextureException.java │ │ │ ├── FrameBufferException.java │ │ │ ├── IncludeShaderException.java │ │ │ ├── LoadShaderException.java │ │ │ ├── LoadTextureException.java │ │ │ └── OpenGLException.java │ │ ├── lights │ │ │ ├── AreaLightHandler.java │ │ │ ├── AreaLightInternal.java │ │ │ ├── DirectionalLightCamera.java │ │ │ ├── DirectionalLightHandler.java │ │ │ ├── DirectionalLightInternal.java │ │ │ ├── DirectionalLightShadowMap.java │ │ │ ├── ILightHandler.java │ │ │ ├── Light.java │ │ │ ├── PointLightHandler.java │ │ │ ├── PointLightInternal.java │ │ │ ├── PointLightShadowMap.java │ │ │ ├── SpotLightCamera.java │ │ │ ├── SpotLightHandler.java │ │ │ ├── SpotLightInternal.java │ │ │ ├── SpotLightShadowMap.java │ │ │ └── mesh │ │ │ │ └── ConeGenerator.java │ │ ├── mesh │ │ │ ├── BufferedMesh.java │ │ │ ├── BufferedPrefab.java │ │ │ ├── Quad.java │ │ │ ├── QuadStrip.java │ │ │ ├── Triangle.java │ │ │ ├── TriangleFan.java │ │ │ ├── TriangleStrip.java │ │ │ ├── Vertex.java │ │ │ ├── animation │ │ │ │ ├── AnimatedModel.java │ │ │ │ └── AnimatedModelSubMesh.java │ │ │ └── mm3d │ │ │ │ ├── Mm3dDataBlock.java │ │ │ │ ├── Mm3dGroup.java │ │ │ │ ├── Mm3dImporter.java │ │ │ │ ├── Mm3dJoint.java │ │ │ │ ├── Mm3dKeyframe.java │ │ │ │ ├── Mm3dMaterial.java │ │ │ │ ├── Mm3dPoint.java │ │ │ │ ├── Mm3dSkeletalAnimation.java │ │ │ │ ├── Mm3dSkeletalFrame.java │ │ │ │ ├── Mm3dTexture.java │ │ │ │ ├── Mm3dWeightedInfluence.java │ │ │ │ └── ModelMM3D.java │ │ ├── objects │ │ │ ├── CubeMapTexture.java │ │ │ ├── Framebuffer.java │ │ │ ├── FramebufferBuilder.java │ │ │ ├── IObject.java │ │ │ ├── IVisualObject.java │ │ │ ├── MaterialGL.java │ │ │ ├── ModelDataNM.java │ │ │ ├── ParticleTexture.java │ │ │ ├── RawLTC.java │ │ │ ├── RawModel.java │ │ │ ├── RawTexture.java │ │ │ ├── Renderbuffer.java │ │ │ ├── RenderbufferBuilder.java │ │ │ ├── Texture.java │ │ │ ├── TextureBuilder.java │ │ │ ├── VAO.java │ │ │ ├── VBO.java │ │ │ └── VertexNM.java │ │ ├── pipeline │ │ │ ├── AmbientOcclusion.java │ │ │ ├── Bloom.java │ │ │ ├── BloomMask.java │ │ │ ├── ChromaticAberration.java │ │ │ ├── ColorCorrection.java │ │ │ ├── DepthOfField.java │ │ │ ├── FXAA.java │ │ │ ├── FinalColorCorrection.java │ │ │ ├── GaussianBlur.java │ │ │ ├── LensFlareMod.java │ │ │ ├── LensFlares.java │ │ │ ├── Lighting.java │ │ │ ├── MergeReflection.java │ │ │ ├── MotionBlur.java │ │ │ ├── MultiPass.java │ │ │ ├── PostProcess.java │ │ │ ├── Reflections.java │ │ │ ├── TAA.java │ │ │ ├── VolumetricLight.java │ │ │ └── shaders │ │ │ │ ├── AmbientOcclusionShader.java │ │ │ │ ├── BasePipelineShader.java │ │ │ │ ├── BasicPostProcessShader.java │ │ │ │ ├── BloomMaskShader.java │ │ │ │ ├── BloomShader.java │ │ │ │ ├── ColorCorrectionShader.java │ │ │ │ ├── DepthOfFieldShader.java │ │ │ │ ├── FinalColorCorrectionShader.java │ │ │ │ ├── GaussianShader.java │ │ │ │ ├── LensFlareModShader.java │ │ │ │ ├── LensFlaresShader.java │ │ │ │ ├── LightingShader.java │ │ │ │ ├── MergeReflectionShader.java │ │ │ │ ├── MotionBlurShader.java │ │ │ │ ├── ReflectionsShader.java │ │ │ │ ├── TAAShader.java │ │ │ │ └── VolumetricLightShader.java │ │ ├── renderers │ │ │ ├── AnimInstanceCubeRenderer.java │ │ │ ├── AnimInstanceForwardRenderer.java │ │ │ ├── AnimInstanceRenderer.java │ │ │ ├── AnimInstanceShadowRenderer.java │ │ │ ├── InstanceCubeRenderer.java │ │ │ ├── InstanceForwardRenderer.java │ │ │ ├── InstanceRenderer.java │ │ │ ├── InstanceShadowRenderer.java │ │ │ ├── InstanceVoxelizeRenderer.java │ │ │ └── shaders │ │ │ │ ├── AnimInstanceBaseShadowShader.java │ │ │ │ ├── AnimInstanceCubeShader.java │ │ │ │ ├── AnimInstanceDeferredShader.java │ │ │ │ ├── AnimInstanceDirectionalShadowShader.java │ │ │ │ ├── AnimInstanceFowardShader.java │ │ │ │ ├── AnimInstancePointShadowShader.java │ │ │ │ ├── AnimInstanceSpotShadowShader.java │ │ │ │ ├── InstanceBaseShadowShader.java │ │ │ │ ├── InstanceCubeShader.java │ │ │ │ ├── InstanceDeferredShader.java │ │ │ │ ├── InstanceDirectionalShadowShader.java │ │ │ │ ├── InstanceFowardShader.java │ │ │ │ ├── InstancePointShadowShader.java │ │ │ │ ├── InstanceSpotShadowShader.java │ │ │ │ └── InstanceVoxelizeShader.java │ │ └── shaders │ │ │ ├── AreaLightShader.java │ │ │ ├── BRDFIntegrationMapShader.java │ │ │ ├── ComputeAOShader.java │ │ │ ├── DirectionalLightShader.java │ │ │ ├── FinalShader.java │ │ │ ├── IrradianceCaptureShader.java │ │ │ ├── OutlineShader.java │ │ │ ├── PointLightShader.java │ │ │ ├── PreFilteredEnvironmentShader.java │ │ │ ├── ShaderIncludes.java │ │ │ ├── ShaderProgram.java │ │ │ ├── SphereToCubeShader.java │ │ │ ├── SpotLightShader.java │ │ │ ├── data │ │ │ ├── Attribute.java │ │ │ ├── IUniform.java │ │ │ ├── Uniform.java │ │ │ ├── UniformAreaLight.java │ │ │ ├── UniformBoolean.java │ │ │ ├── UniformDirectionalLight.java │ │ │ ├── UniformDynamicSky.java │ │ │ ├── UniformFloat.java │ │ │ ├── UniformInteger.java │ │ │ ├── UniformMaterial.java │ │ │ ├── UniformMatrix3.java │ │ │ ├── UniformMatrix4.java │ │ │ ├── UniformObject.java │ │ │ ├── UniformPointLight.java │ │ │ ├── UniformSampler.java │ │ │ ├── UniformSpotLight.java │ │ │ ├── UniformVec2.java │ │ │ ├── UniformVec3.java │ │ │ └── UniformVec4.java │ │ │ └── sky │ │ │ ├── AmbientSkyCubeShader.java │ │ │ ├── AmbientSkyShader.java │ │ │ ├── DynamicSkyCubeShader.java │ │ │ ├── DynamicSkyShader.java │ │ │ ├── StaticSkyCubeShader.java │ │ │ └── StaticSkyShader.java │ ├── io │ │ ├── BinaryInputStream.java │ │ ├── BinaryOutputStream.java │ │ ├── FileResource.java │ │ ├── Image.java │ │ ├── Load.java │ │ ├── LoadDeprecated.java │ │ └── Save.java │ ├── lua │ │ ├── LuaEngine.java │ │ ├── RunnableArgs.java │ │ ├── history │ │ │ ├── HistoryChange.java │ │ │ ├── HistoryObjectReference.java │ │ │ ├── HistorySnapshot.java │ │ │ └── HistoryStack.java │ │ ├── lib │ │ │ ├── EnumType.java │ │ │ ├── Enums.java │ │ │ ├── FourArgFunction.java │ │ │ ├── GameEngineLib.java │ │ │ ├── LuaTableReadOnly.java │ │ │ ├── LuaUtil.java │ │ │ ├── PreventInfiniteInstructions.java │ │ │ ├── ReadOnlyLuaTableTest.java │ │ │ └── ScriptInterruptException.java │ │ ├── network │ │ │ ├── InternalClient.java │ │ │ ├── InternalRegister.java │ │ │ ├── InternalServer.java │ │ │ ├── UUIDSerializable.java │ │ │ └── internal │ │ │ │ ├── ClientProcessable.java │ │ │ │ ├── GZIPUtil.java │ │ │ │ ├── JSONUtil.java │ │ │ │ ├── NonReplicatable.java │ │ │ │ ├── PingRequest.java │ │ │ │ ├── ServerProcessable.java │ │ │ │ └── protocol │ │ │ │ ├── ClientConnectFinishTCP.java │ │ │ │ ├── ClientConnectTCP.java │ │ │ │ ├── ClientLoadMapTCP.java │ │ │ │ ├── InstanceCreateTCP.java │ │ │ │ ├── InstanceDestroyTCP.java │ │ │ │ ├── InstanceUpdateUDP.java │ │ │ │ └── TestProtocol.java │ │ └── type │ │ │ ├── Clamp.java │ │ │ ├── DataModel.java │ │ │ ├── LuaConnection.java │ │ │ ├── LuaDatatype.java │ │ │ ├── LuaEvent.java │ │ │ ├── LuaField.java │ │ │ ├── LuaFieldFlag.java │ │ │ ├── LuaValuetype.java │ │ │ ├── NumberClamp.java │ │ │ ├── NumberClampPreferred.java │ │ │ ├── ScriptRunner.java │ │ │ ├── data │ │ │ ├── Color3.java │ │ │ ├── Color4.java │ │ │ ├── ColorBase.java │ │ │ ├── List.java │ │ │ ├── Matrix4.java │ │ │ ├── Ray.java │ │ │ ├── Vector2.java │ │ │ └── Vector3.java │ │ │ └── object │ │ │ ├── Asset.java │ │ │ ├── AssetLoadable.java │ │ │ ├── AudioPlayerBase.java │ │ │ ├── Instance.java │ │ │ ├── InstancePropertySubscriber.java │ │ │ ├── LightBase.java │ │ │ ├── PhysicsBase.java │ │ │ ├── Positionable.java │ │ │ ├── PrefabRenderer.java │ │ │ ├── SceneStorable.java │ │ │ ├── ScriptBase.java │ │ │ ├── ScriptExecutor.java │ │ │ ├── Service.java │ │ │ ├── TreeInvisible.java │ │ │ ├── TreeViewable.java │ │ │ ├── WeldedStructure.java │ │ │ ├── insts │ │ │ ├── AssetFolder.java │ │ │ ├── AudioPlayer2D.java │ │ │ ├── AudioPlayer3D.java │ │ │ ├── AudioSource.java │ │ │ ├── Camera.java │ │ │ ├── Connection.java │ │ │ ├── DynamicSkybox.java │ │ │ ├── Folder.java │ │ │ ├── GameObject.java │ │ │ ├── Material.java │ │ │ ├── Mesh.java │ │ │ ├── Model.java │ │ │ ├── PhysicsObject.java │ │ │ ├── Player.java │ │ │ ├── PlayerConnection.java │ │ │ ├── PlayerGui.java │ │ │ ├── PlayerPhysics.java │ │ │ ├── PlayerScripts.java │ │ │ ├── Prefab.java │ │ │ ├── RayResult.java │ │ │ ├── Scene.java │ │ │ ├── SceneInternal.java │ │ │ ├── ServerConnection.java │ │ │ ├── Skybox.java │ │ │ ├── Texture.java │ │ │ ├── Weld.java │ │ │ ├── animation │ │ │ │ ├── Animation.java │ │ │ │ ├── AnimationController.java │ │ │ │ ├── AnimationData.java │ │ │ │ ├── AnimationKeyframe.java │ │ │ │ ├── AnimationKeyframeSequence.java │ │ │ │ ├── AnimationTrack.java │ │ │ │ ├── Animations.java │ │ │ │ ├── Bone.java │ │ │ │ ├── BoneTree.java │ │ │ │ ├── BoneTreeNode.java │ │ │ │ ├── BoneWeight.java │ │ │ │ └── Bones.java │ │ │ ├── light │ │ │ │ ├── AreaLight.java │ │ │ │ ├── DirectionalLight.java │ │ │ │ ├── PointLight.java │ │ │ │ └── SpotLight.java │ │ │ ├── script │ │ │ │ ├── GlobalScript.java │ │ │ │ ├── LocalScript.java │ │ │ │ └── Script.java │ │ │ ├── ui │ │ │ │ ├── Button.java │ │ │ │ ├── CSS.java │ │ │ │ ├── Gui.java │ │ │ │ ├── GuiBase.java │ │ │ │ ├── GuiBasePane.java │ │ │ │ ├── HBox.java │ │ │ │ ├── Label.java │ │ │ │ ├── Pane.java │ │ │ │ ├── TextField.java │ │ │ │ └── VBox.java │ │ │ └── values │ │ │ │ ├── BoolValue.java │ │ │ │ ├── Color3Value.java │ │ │ │ ├── Color4Value.java │ │ │ │ ├── IntValue.java │ │ │ │ ├── ListValue.java │ │ │ │ ├── Matrix4Value.java │ │ │ │ ├── NumberValue.java │ │ │ │ ├── ObjectValue.java │ │ │ │ ├── StringValue.java │ │ │ │ ├── ValueBase.java │ │ │ │ ├── Vector2Value.java │ │ │ │ └── Vector3Value.java │ │ │ └── services │ │ │ ├── Assets.java │ │ │ ├── Connections.java │ │ │ ├── Core.java │ │ │ ├── Debris.java │ │ │ ├── GameECS.java │ │ │ ├── HistoryService.java │ │ │ ├── Lighting.java │ │ │ ├── Players.java │ │ │ ├── ProjectECS.java │ │ │ ├── RenderSettings.java │ │ │ ├── RunService.java │ │ │ ├── Scenes.java │ │ │ ├── ScriptService.java │ │ │ ├── SoundService.java │ │ │ ├── StarterPlayer.java │ │ │ ├── StarterPlayerGui.java │ │ │ ├── StarterPlayerScripts.java │ │ │ ├── Storage.java │ │ │ ├── UserInputService.java │ │ │ ├── WeldService.java │ │ │ └── Workspace.java │ ├── observer │ │ ├── InternalRenderable.java │ │ ├── PostRenderable.java │ │ ├── Renderable.java │ │ ├── RenderableInstance.java │ │ ├── RenderableMesh.java │ │ ├── RenderableWorld.java │ │ └── Tickable.java │ ├── physics │ │ ├── PhysicsObjectInternal.java │ │ ├── PhysicsWorld.java │ │ └── SoundMaterial.java │ ├── resources │ │ ├── CreateTextureTask.java │ │ ├── IResourcesManagerBackend.java │ │ ├── LoadLTCTask.java │ │ ├── LoadTextureTask.java │ │ └── ResourcesManager.java │ ├── tasks │ │ ├── ITaskRunnerThread.java │ │ ├── OnFinished.java │ │ ├── Task.java │ │ ├── TaskManager.java │ │ ├── TaskRunnerGLThread.java │ │ ├── TaskRunnerThread.java │ │ └── ThreadUtils.java │ └── util │ │ ├── AABBUtil.java │ │ ├── BinFile.java │ │ ├── ClassFinder.java │ │ ├── FileIO.java │ │ ├── FileUtils.java │ │ ├── GLCompat.java │ │ ├── IOUtil.java │ │ ├── JVMUtil.java │ │ ├── MatrixUtils.java │ │ ├── MeshUtils.java │ │ ├── Misc.java │ │ ├── NanoVGUtil.java │ │ ├── Pair.java │ │ ├── PhysicsUtils.java │ │ ├── Sync.java │ │ └── TeapotData.java ├── ide │ ├── IDE.java │ ├── IDEDebug.java │ └── layout │ │ ├── IdeDockPane.java │ │ ├── IdeLayout.java │ │ ├── IdePane.java │ │ ├── IdeVerticalDock.java │ │ └── windows │ │ ├── ContextMenuType.java │ │ ├── ErrorWindow.java │ │ ├── IdeCSSEditor.java │ │ ├── IdeConsole.java │ │ ├── IdeExplorer.java │ │ ├── IdeGameView.java │ │ ├── IdeLuaEditor.java │ │ ├── IdeMaterialViewer.java │ │ ├── IdeProperties.java │ │ ├── InsertWindow.java │ │ ├── InsertWindowNew.java │ │ ├── StandardUserControls.java │ │ ├── code │ │ ├── AutoSyntaxCodeEditor.java │ │ ├── CSSEditor.java │ │ ├── HighlightableCodeEditor.java │ │ ├── LuaEditor.java │ │ └── SearchableCodeEditor.java │ │ └── icons │ │ └── Icons.java ├── paulscode │ └── sound │ │ ├── Channel.java │ │ ├── CommandObject.java │ │ ├── CommandThread.java │ │ ├── FilenameURL.java │ │ ├── ICodec.java │ │ ├── IStreamListener.java │ │ ├── Library.java │ │ ├── ListenerData.java │ │ ├── MidiChannel.java │ │ ├── SimpleThread.java │ │ ├── SoundBuffer.java │ │ ├── SoundSystem.java │ │ ├── SoundSystemConfig.java │ │ ├── SoundSystemException.java │ │ ├── SoundSystemLogger.java │ │ ├── Source.java │ │ ├── StreamThread.java │ │ ├── Vector3D.java │ │ ├── codecs │ │ ├── CodecJOgg.java │ │ └── CodecWav.java │ │ └── libraries │ │ ├── ALContext.java │ │ ├── ChannelLWJGLOpenAL.java │ │ ├── LibraryLWJGLOpenAL.java │ │ └── SourceLWJGLOpenAL.java └── test │ ├── HelloWorld.java │ ├── MultipleViewport.java │ ├── RunnerTest.java │ ├── TestPBR.java │ └── TestSimple.java └── resources ├── assets ├── cursors │ ├── arrow.pdn │ ├── arrow.png │ ├── hresize.pdn │ ├── hresize.png │ ├── ibeam.pdn │ ├── ibeam.png │ ├── vresize.pdn │ └── vresize.png ├── models │ ├── SkyDome.obj │ ├── cube.obj │ └── water.obj ├── scripts │ └── camera.lua ├── shaders │ ├── AreaLight.fs │ ├── AreaLight.vs │ ├── BRDFIntegrationMap.fs │ ├── BRDFIntegrationMap.vs │ ├── DirectionalLight.fs │ ├── DirectionalLight.vs │ ├── IrradianceCapture.fs │ ├── IrradianceCapture.vs │ ├── Outline.fs │ ├── Outline.vs │ ├── Particle.fs │ ├── Particle.vs │ ├── PointLight.fs │ ├── PointLight.vs │ ├── PreFilteredEnvironment.fs │ ├── PreFilteredEnvironment.vs │ ├── SphereToCube.fs │ ├── SphereToCube.vs │ ├── SpotLight.fs │ ├── SpotLight.vs │ ├── Voxelize.fs │ ├── Voxelize.gs │ ├── Voxelize.vs │ ├── Water.fs │ ├── Water.gs │ ├── Water.vs │ ├── compute │ │ └── ao.cs │ ├── deferred │ │ ├── AmbientOcclusion.fs │ │ ├── AmbientOcclusionHBAO.fs │ │ ├── Bloom.fs │ │ ├── BloomMask.fs │ │ ├── ColorCorrection.fs │ │ ├── Final.fs │ │ ├── Final.vs │ │ ├── GaussianBlur.fs │ │ ├── GaussianBlur.vs │ │ ├── LensFlares.fs │ │ ├── LensFlaresMod.fs │ │ ├── Lighting.fs │ │ ├── MergeReflection.fs │ │ ├── MotionBlur.fs │ │ ├── Reflections.fs │ │ ├── TAA.fs │ │ ├── TAA.vs │ │ ├── VolumetricLight.fs │ │ └── VolumetricLight.vs │ ├── deferred_compute │ │ ├── AOBlur.comp │ │ ├── ColorCorrection.comp │ │ ├── HBAO.comp │ │ ├── Lighting.comp │ │ ├── MotionBlur.comp │ │ ├── SSDO.comp │ │ └── TAA.comp │ ├── includes │ │ ├── color.isl │ │ ├── common.isl │ │ ├── global.isl │ │ ├── lighting.isl │ │ └── materials.isl │ ├── pipeline │ │ └── DefaultPipeline.vs │ ├── postprocess │ │ ├── ChromaticAberration.fs │ │ ├── DoF.fs │ │ ├── FXAA.fs │ │ ├── FXAA.vs │ │ ├── Final.fs │ │ ├── Final.vs │ │ └── FinalColorCorrection.fs │ ├── renderers │ │ ├── AnimInstanceCube.vs │ │ ├── AnimInstanceDeferred.vs │ │ ├── AnimInstanceDirectionalShadow.vs │ │ ├── AnimInstanceForward.vs │ │ ├── AnimInstancePointShadow.vs │ │ ├── AnimInstanceSpotShadow.vs │ │ ├── InstanceCube.gs │ │ ├── InstanceCube.vs │ │ ├── InstanceDeferred.fs │ │ ├── InstanceDeferred.vs │ │ ├── InstanceDirectionalShadow.gs │ │ ├── InstanceDirectionalShadow.vs │ │ ├── InstanceForward.fs │ │ ├── InstanceForward.vs │ │ ├── InstancePointShadow.gs │ │ ├── InstancePointShadow.vs │ │ ├── InstanceShadow.fs │ │ └── InstanceSpotShadow.vs │ └── sky │ │ ├── Ambient.fs │ │ ├── Ambient.vs │ │ ├── AmbientCube.fs │ │ ├── AmbientCube.gs │ │ ├── AmbientCube.vs │ │ ├── Dynamic.fs │ │ ├── Dynamic.vs │ │ ├── DynamicCube.fs │ │ ├── DynamicCube.gs │ │ ├── DynamicCube.vs │ │ ├── Static.fs │ │ ├── Static.vs │ │ ├── StaticCube.fs │ │ ├── StaticCube.gs │ │ └── StaticCube.vs └── textures │ ├── amp.ltc │ ├── checker.png │ ├── lens │ ├── lens_color.png │ ├── lens_dirt.png │ └── lens_star.png │ └── mat.ltc └── ide └── layout └── windows └── icons ├── AnimationData.png ├── AssetFolder.png ├── AssetFolderMaterial.png ├── AssetFolderMesh.png ├── AssetFolderPrefab.png ├── AssetFolderTexture.png ├── Box.png ├── CSS.png ├── Camera.png ├── Console.png ├── Copy.png ├── Cross.png ├── Cut.png ├── DirectionalLight.png ├── Event.png ├── Explorer.png ├── Film.png ├── FilmTimeline.png ├── Folder.png ├── GameObject.png ├── Grid.png ├── GridSnap.png ├── Gui.png ├── ImageButton.png ├── Keyboard.png ├── Light.png ├── LightSpot.png ├── Material.png ├── Mesh.png ├── Model.png ├── ModelAlt.png ├── Network.png ├── NetworkPlayer.png ├── NetworkServer.png ├── New.png ├── Pane.png ├── Paste.png ├── Play.png ├── PlayServer.png ├── Player.png ├── PlayerGui.png ├── PlayerScripts.png ├── PlayerScriptsGUI.png ├── Players.png ├── Properties.png ├── Redo.png ├── RemoteEvent.png ├── Save.png ├── SaveAs.png ├── Scenes.png ├── Script.png ├── ScriptGlobal.png ├── ScriptJava.png ├── ScriptLocal.png ├── ScriptService.png ├── ServerScripts.png ├── Skybox.png ├── Sound.png ├── StarterPlayer.png ├── Storage.png ├── TextButton.png ├── TextField.png ├── TextLabel.png ├── TextLabelAlt.png ├── Texture.png ├── Undo.png ├── Value.png ├── Value2.png ├── Weld.png ├── World.png ├── computer.png ├── cup.png ├── hbox.png ├── icon-sky.png ├── plus-small.png ├── vbox.png └── wat.gif /.clang-format: -------------------------------------------------------------------------------- 1 | # Format style for glsl code 2 | BasedOnStyle: LLVM 3 | IndentWidth: 4 4 | TabWidth: 4 5 | UseTab: Always 6 | ColumnLimit: 100 7 | AllowShortFunctionsOnASingleLine: None -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Handle line endings automatically for files detected as text 2 | # and leave all files detected as binary untouched. 3 | * text=auto 4 | 5 | # 6 | # The above will handle all files NOT found below 7 | # 8 | # These files are text and should be normalized (Convert crlf => lf) 9 | *.css text 10 | *.df text 11 | *.htm text 12 | *.html text 13 | *.java text 14 | *.js text 15 | *.json text 16 | *.jsp text 17 | *.jspf text 18 | *.properties text 19 | *.sh text 20 | *.tld text 21 | *.txt text 22 | *.xml text 23 | *.glsl text 24 | *.groovy text 25 | *.isl text 26 | *.vs text 27 | *.fs text 28 | *.gs text 29 | gradlew text 30 | 31 | # These files are binary and should be left untouched 32 | # (binary is a macro for -text -diff) 33 | *.class binary 34 | *.dll binary 35 | *.ear binary 36 | *.gif binary 37 | *.ico binary 38 | *.jar binary 39 | *.jpg binary 40 | *.jpeg binary 41 | *.png binary 42 | *.so binary 43 | *.war binary 44 | *.blend binary 45 | -------------------------------------------------------------------------------- /.github/workflows/push-continous-delivery.yml: -------------------------------------------------------------------------------- 1 | name: Continuous Delivery 2 | on: [push] 3 | jobs: 4 | buildDist: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - name: Checkout submodules 9 | shell: bash 10 | run: | 11 | auth_header="$(git config --local --get http.https://github.com/.extraheader)" 12 | git submodule sync --recursive 13 | git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 14 | - name: Set up JDK 1.8 15 | uses: actions/setup-java@v1 16 | with: 17 | java-version: 1.8 18 | - name: Build Tar 19 | run: ./gradlew distTar -PAllNatives -q 20 | - name: Untar for upload 21 | run: | 22 | mkdir -p artifact 23 | tar -C artifact --strip-components=1 -xf build/distributions/AnarchyEngine.tar 24 | - name: Upload artifact 25 | uses: actions/upload-artifact@v1.0.0 26 | with: 27 | name: AnarchyEngineIDE 28 | path: artifact 29 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lwjgui"] 2 | path = lwjgui 3 | url = https://github.com/orange451/LWJGUI.git 4 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | The following is a list of contributors to the [Anarchy Engine](https://github.com/orange451/AnarchyEngine) project, in alphabetical order: 2 | 3 | * [Andrew Hamilton](https://github.com/orange451) 4 | * [Pablo González](https://github.com/Guerra24) <> -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Meshes/Floor.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Meshes/Floor.mesh -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Meshes/Mesh_0.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Meshes/Mesh_0.mesh -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Meshes/Mesh_1.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Meshes/Mesh_1.mesh -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Meshes/Sphere.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Meshes/Sphere.mesh -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/RedBarrel_D.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/RedBarrel_D.jpg -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/RedBarrel_N.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/RedBarrel_N.jpg -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/RedBarrel_R.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/RedBarrel_R.jpg -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/RedBarrel_S.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/RedBarrel_S.jpg -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/TileD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/TileD.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/TileM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/TileM.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/TileN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/TileN.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/TileR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/TileR.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/albedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/albedo.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/albedo0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/albedo0.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/metallic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/metallic.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/metallic0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/metallic0.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/normal.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/normal0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/normal0.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/roughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/roughness.png -------------------------------------------------------------------------------- /Examples/fpsTest/Resources/Textures/roughness0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Examples/fpsTest/Resources/Textures/roughness0.png -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/Readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/Readme.txt -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_body.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_body.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_body_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_body_h.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_body_local.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_body_local.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_body_s.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_body_s.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_head.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_head.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_head_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_head_h.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_head_local.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_head_local.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_helmet_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_helmet_h.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_helmet_local.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_helmet_local.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_helmet_s.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_helmet_s.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_lamp_update.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_lamp_update.blend -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/bob_lamp_update_export.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/bob_lamp_update_export.blend -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/lantern.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/lantern.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/lantern_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/lantern_h.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/lantern_local.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/lantern_local.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/lantern_top.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/lantern_top.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/lantern_top_h.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/lantern_top_h.tga -------------------------------------------------------------------------------- /Resources/Testing/Animation/bob/lantern_top_local.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Animation/bob/lantern_top_local.tga -------------------------------------------------------------------------------- /Resources/Testing/IBL/apartment.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/IBL/apartment.hdr -------------------------------------------------------------------------------- /Resources/Testing/IBL/apartment_env.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/IBL/apartment_env.hdr -------------------------------------------------------------------------------- /Resources/Testing/IBL/autoshop_01_2k.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/IBL/autoshop_01_2k.hdr -------------------------------------------------------------------------------- /Resources/Testing/IBL/office.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/IBL/office.hdr -------------------------------------------------------------------------------- /Resources/Testing/IBL/office_env.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/IBL/office_env.hdr -------------------------------------------------------------------------------- /Resources/Testing/PBR/iron/albedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/iron/albedo.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/iron/metallic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/iron/metallic.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/iron/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/iron/normal.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/iron/roughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/iron/roughness.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/scratch/albedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/scratch/albedo.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/scratch/metallic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/scratch/metallic.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/scratch/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/scratch/normal.png -------------------------------------------------------------------------------- /Resources/Testing/PBR/scratch/roughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/PBR/scratch/roughness.png -------------------------------------------------------------------------------- /Resources/Testing/Sound/SampleSound.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/Resources/Testing/Sound/SampleSound.ogg -------------------------------------------------------------------------------- /distZip: -------------------------------------------------------------------------------- 1 | ./gradlew distZip -PAllNatives 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'AnarchyEngine' 2 | include 'lwjgui' -------------------------------------------------------------------------------- /src/main/java/de/jarnbjo/ogg/EndOfOggStreamException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $ProjectName$ 3 | * $ProjectRevision$ 4 | * ----------------------------------------------------------- 5 | * $Id: EndOfOggStreamException.java,v 1.1 2003/03/03 21:02:20 jarnbjo Exp $ 6 | * ----------------------------------------------------------- 7 | * 8 | * $Author: jarnbjo $ 9 | * 10 | * Description: 11 | * 12 | * Copyright 2002-2003 Tor-Einar Jarnbjo 13 | * ----------------------------------------------------------- 14 | * 15 | * Change History 16 | * ----------------------------------------------------------- 17 | * $Log: EndOfOggStreamException.java,v $ 18 | * Revision 1.1 2003/03/03 21:02:20 jarnbjo 19 | * no message 20 | * 21 | */ 22 | 23 | package de.jarnbjo.ogg; 24 | 25 | import java.io.IOException; 26 | 27 | /** 28 | * Exception thrown when reaching the end of an Ogg stream 29 | */ 30 | 31 | public class EndOfOggStreamException extends IOException { 32 | 33 | public EndOfOggStreamException() { 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/de/jarnbjo/ogg/OggFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $ProjectName$ 3 | * $ProjectRevision$ 4 | * ----------------------------------------------------------- 5 | * $Id: OggFormatException.java,v 1.1 2003/03/03 21:02:20 jarnbjo Exp $ 6 | * ----------------------------------------------------------- 7 | * 8 | * $Author: jarnbjo $ 9 | * 10 | * Description: 11 | * 12 | * Copyright 2002-2003 Tor-Einar Jarnbjo 13 | * ----------------------------------------------------------- 14 | * 15 | * Change History 16 | * ----------------------------------------------------------- 17 | * $Log: OggFormatException.java,v $ 18 | * Revision 1.1 2003/03/03 21:02:20 jarnbjo 19 | * no message 20 | * 21 | */ 22 | 23 | package de.jarnbjo.ogg; 24 | 25 | import java.io.IOException; 26 | 27 | /** 28 | * Exception thrown when trying to read a corrupted Ogg stream. 29 | */ 30 | 31 | public class OggFormatException extends IOException { 32 | 33 | public OggFormatException() { 34 | super(); 35 | } 36 | 37 | public OggFormatException(String message) { 38 | super(message); 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/de/jarnbjo/vorbis/VorbisFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $ProjectName$ 3 | * $ProjectRevision$ 4 | * ----------------------------------------------------------- 5 | * $Id: VorbisFormatException.java,v 1.2 2003/03/16 01:11:12 jarnbjo Exp $ 6 | * ----------------------------------------------------------- 7 | * 8 | * $Author: jarnbjo $ 9 | * 10 | * Description: 11 | * 12 | * Copyright 2002-2003 Tor-Einar Jarnbjo 13 | * ----------------------------------------------------------- 14 | * 15 | * Change History 16 | * ----------------------------------------------------------- 17 | * $Log: VorbisFormatException.java,v $ 18 | * Revision 1.2 2003/03/16 01:11:12 jarnbjo 19 | * no message 20 | * 21 | * 22 | */ 23 | 24 | package de.jarnbjo.vorbis; 25 | 26 | import java.io.IOException; 27 | 28 | /** 29 | * Exception thrown when trying to read a corrupted Vorbis stream. 30 | */ 31 | 32 | public class VorbisFormatException extends IOException { 33 | 34 | public VorbisFormatException() { 35 | super(); 36 | } 37 | 38 | public VorbisFormatException(String message) { 39 | super(message); 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/java/engine/ClientLocalRunner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine; 12 | 13 | import engine.io.Load; 14 | 15 | public class ClientLocalRunner extends ClientRunner { 16 | 17 | public ClientLocalRunner(String... args) { 18 | super(args); 19 | } 20 | 21 | @Override 22 | public void setupEngine() { 23 | super.setupEngine(); 24 | game.setServer(false); 25 | } 26 | 27 | @Override 28 | public void loadScene(String[] args) { 29 | if (args.length == 1) { 30 | Load.load(args[0]); 31 | } 32 | } 33 | 34 | public static void main(String[] args) { 35 | new ClientLocalRunner(args); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/ClientServerRunner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine; 12 | 13 | import engine.io.Load; 14 | 15 | public class ClientServerRunner extends ClientRunner { 16 | 17 | public ClientServerRunner(String... args) { 18 | super(args); 19 | } 20 | 21 | @Override 22 | public void loadScene(String[] args) { 23 | if (args.length == 1) { 24 | Load.load(args[0]); 25 | } 26 | } 27 | 28 | public static void main(String[] args) { 29 | new ClientServerRunner(args); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/FileFormats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine; 12 | 13 | public class FileFormats { 14 | public static final String MESHES = "x,obj,fbx,3ds,smd,xml,dae,gltf,ms3d,blend,md5mesh"; 15 | 16 | public static final String AUDIO = "wav,ogg,midi"; 17 | 18 | public static final String TEXTURES = "png,bmp,tga,jpg,hdr"; 19 | 20 | public static final String PREFABS = MESHES + ",md5anim"; 21 | 22 | public static final String ANIMATIONS = "smd,md5anim"; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/engine/FilePath.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine; 12 | 13 | import java.io.File; 14 | 15 | import engine.util.FileUtils; 16 | 17 | public class FilePath { 18 | 19 | public static final String PROJECT_IDENTIFIER = "%PROJECT%"; 20 | 21 | /** 22 | * Convert a URL string to a full system filepath. 23 | * @param ideFilePath 24 | * @return 25 | */ 26 | public static String convertToSystem(String ideFilePath) { 27 | return FileUtils.fixPath(ideFilePath.replace(PROJECT_IDENTIFIER, new File(Game.saveDirectory).getAbsolutePath())); 28 | } 29 | 30 | /** 31 | * Convert a full system filepath to a project-relative filepath. 32 | * @param systemFilePath 33 | * @return 34 | */ 35 | public static String convertToIDE(String systemFilePath) { 36 | return FileUtils.fixPath(systemFilePath.replace(new File(Game.saveDirectory).getAbsolutePath(), PROJECT_IDENTIFIER)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/engine/GameSubscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine; 12 | 13 | public interface GameSubscriber { 14 | public void gameUpdateEvent(boolean important); 15 | } -------------------------------------------------------------------------------- /src/main/java/engine/IEngineThread.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine; 12 | 13 | public interface IEngineThread { 14 | 15 | public void init(); 16 | 17 | public void dispose(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/IDeferredPipeline.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl; 12 | 13 | import engine.gl.objects.Framebuffer; 14 | import engine.gl.objects.IObject; 15 | import engine.gl.objects.Texture; 16 | 17 | public interface IDeferredPipeline extends IObject { 18 | 19 | public void process(RendererData rnd, IRenderingData rd); 20 | 21 | public void render(Framebuffer fb); 22 | 23 | public Texture getDiffuseTex(); 24 | 25 | public Texture getMotionTex(); 26 | 27 | public Texture getNormalTex(); 28 | 29 | public Texture getPbrTex(); 30 | 31 | public Texture getMaskTex(); 32 | 33 | public Texture getDepthTex(); 34 | 35 | public void reloadShaders(); 36 | 37 | public void resize(int width, int height); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/IRenderingData.java: -------------------------------------------------------------------------------- 1 | package engine.gl; 2 | 3 | import org.joml.Matrix4f; 4 | 5 | import engine.lua.type.object.insts.Camera; 6 | 7 | public class IRenderingData { 8 | 9 | public Camera camera; 10 | public Matrix4f projectionMatrix; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/RenderingSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl; 12 | 13 | public class RenderingSettings { 14 | 15 | public volatile boolean shadowsEnabled = true; 16 | public volatile boolean volumetricLightEnabled = false; 17 | public volatile boolean fxaaEnabled = true; 18 | public volatile boolean taaEnabled = false; 19 | public volatile boolean vsyncEnabled = false; // TODO: Implement vsync toggle 20 | // TODO: Maximize and restore windows 21 | public volatile boolean motionBlurEnabled = false; 22 | public volatile boolean depthOfFieldEnabled = false; 23 | public volatile boolean ssrEnabled = false; 24 | public volatile boolean parallaxEnabled = false; 25 | public volatile boolean ambientOcclusionEnabled = true; 26 | public volatile boolean chromaticAberrationEnabled = false; 27 | public volatile boolean lensFlaresEnabled = false; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/compute/ComputeMultiPass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.compute; 12 | 13 | public class ComputeMultiPass extends ComputePipeline { 14 | 15 | public ComputeMultiPass(int width, int height) { 16 | super(width, height); 17 | } 18 | 19 | @Override 20 | public void setupPasses() { 21 | super.addStep(PipelineSteps.AMBIENT_OCCLUSION, new HBAO()); 22 | super.addStep(PipelineSteps.AO_BLUR, new AOBlur()); 23 | super.addStep(PipelineSteps.LIGHTING, new Lighting()); 24 | super.addStep(PipelineSteps.MOTION_BLUR, new MotionBlur()); 25 | super.addStep(PipelineSteps.COLOR_CORRECTION, new ColorCorrection()); 26 | super.addStep(PipelineSteps.ANTI_ALIASING, new TAA()); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/compute/shaders/MotionBlurShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.compute.shaders; 12 | 13 | import static org.lwjgl.opengl.GL43C.GL_COMPUTE_SHADER; 14 | 15 | import engine.gl.compute.BaseComputeShader; 16 | import engine.gl.shaders.data.UniformSampler; 17 | 18 | public class MotionBlurShader extends BaseComputeShader { 19 | 20 | private UniformSampler image = new UniformSampler("image"); 21 | private UniformSampler gMotion = new UniformSampler("gMotion"); 22 | 23 | @Override 24 | protected void setupShader() { 25 | super.setupShader(); 26 | super.addShader(new Shader("assets/shaders/deferred_compute/MotionBlur.comp", GL_COMPUTE_SHADER)); 27 | this.storeUniforms(image, gMotion); 28 | } 29 | 30 | @Override 31 | protected void loadInitialData() { 32 | super.start(); 33 | image.loadTexUnit(0); 34 | gMotion.loadTexUnit(1); 35 | super.stop(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/CompileShaderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.exceptions; 12 | 13 | public class CompileShaderException extends RuntimeException { 14 | 15 | private static final long serialVersionUID = -8459235864100073938L; 16 | 17 | public CompileShaderException() { 18 | super(); 19 | } 20 | 21 | public CompileShaderException(String error) { 22 | super(error); 23 | } 24 | 25 | public CompileShaderException(Exception e) { 26 | super(e); 27 | } 28 | 29 | public CompileShaderException(Throwable cause) { 30 | super(cause); 31 | } 32 | 33 | public CompileShaderException(String message, Throwable cause) { 34 | super(message, cause); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/DecodeTextureException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.exceptions; 12 | 13 | public class DecodeTextureException extends RuntimeException { 14 | 15 | private static final long serialVersionUID = -8629683316677759946L; 16 | 17 | public DecodeTextureException(String e) { 18 | super(e); 19 | } 20 | 21 | public DecodeTextureException(Exception e) { 22 | super(e); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/FrameBufferException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.exceptions; 12 | 13 | public class FrameBufferException extends RuntimeException { 14 | 15 | private static final long serialVersionUID = -8421763529132359332L; 16 | 17 | public FrameBufferException(String err) { 18 | super(err); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/IncludeShaderException.java: -------------------------------------------------------------------------------- 1 | package engine.gl.exceptions; 2 | 3 | public class IncludeShaderException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = -884808269247123167L; 6 | 7 | public IncludeShaderException() { 8 | super(); 9 | } 10 | 11 | public IncludeShaderException(String error) { 12 | super(error); 13 | } 14 | 15 | public IncludeShaderException(Exception e) { 16 | super(e); 17 | } 18 | 19 | public IncludeShaderException(Throwable cause) { 20 | super(cause); 21 | } 22 | 23 | public IncludeShaderException(String message, Throwable cause) { 24 | super(message, cause); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/LoadShaderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.exceptions; 12 | 13 | public class LoadShaderException extends RuntimeException { 14 | 15 | private static final long serialVersionUID = -5645376169749026843L; 16 | 17 | public LoadShaderException() { 18 | super(); 19 | } 20 | 21 | public LoadShaderException(String error) { 22 | super(error); 23 | } 24 | 25 | public LoadShaderException(Exception e) { 26 | super(e); 27 | } 28 | 29 | public LoadShaderException(Throwable cause) { 30 | super(cause); 31 | } 32 | 33 | public LoadShaderException(String message, Throwable cause) { 34 | super(message, cause); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/LoadTextureException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.exceptions; 12 | 13 | public class LoadTextureException extends RuntimeException { 14 | 15 | private static final long serialVersionUID = 960750507253812538L; 16 | 17 | public LoadTextureException(Exception cause) { 18 | super(cause); 19 | } 20 | 21 | public LoadTextureException(String texture, Exception cause) { 22 | super(cause); 23 | } 24 | 25 | public LoadTextureException(String string) { 26 | super(string); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/exceptions/OpenGLException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.exceptions; 12 | 13 | public class OpenGLException extends UnknownError { 14 | private static final long serialVersionUID = -7380123602100161964L; 15 | 16 | public OpenGLException(String message) { 17 | super(message); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/lights/AreaLightInternal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.lights; 12 | 13 | import org.joml.Vector3f; 14 | 15 | public class AreaLightInternal extends Light { 16 | 17 | public Vector3f direction = new Vector3f(1, 1, 1); 18 | public float sizeX = 1, sizeY = 1; 19 | 20 | public AreaLightInternal(Vector3f direction, Vector3f position, float intensity) { 21 | this.direction.set(direction); 22 | super.position.set(position); 23 | this.intensity = intensity; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/lights/ILightHandler.java: -------------------------------------------------------------------------------- 1 | package engine.gl.lights; 2 | 3 | public interface ILightHandler { 4 | 5 | public void addLight(T l); 6 | 7 | public void removeLight(T l); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/lights/Light.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.lights; 12 | 13 | import org.joml.Vector3f; 14 | 15 | public abstract class Light { 16 | public Vector3f position = new Vector3f(); 17 | public float intensity = 1; 18 | public boolean visible = true; 19 | public Vector3f color = new Vector3f(1, 1, 1); 20 | 21 | public Vector3f getPosition() { 22 | return position; 23 | } 24 | 25 | public void setPosition(Vector3f position) { 26 | this.position.set(position); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/mesh/QuadStrip.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.mesh; 12 | 13 | import java.util.ArrayList; 14 | 15 | public class QuadStrip { 16 | private ArrayList quads = new ArrayList(); 17 | private Quad currentQuad = new Quad(); 18 | 19 | public void addVertex( Vertex vert ) { 20 | if ( currentQuad.isFull() ) { 21 | Quad lastQuad = currentQuad; 22 | quads.add(lastQuad); 23 | currentQuad = new Quad(); 24 | currentQuad.addVertex(lastQuad.getVertex(2).clone()); 25 | currentQuad.addVertex(lastQuad.getVertex(3).clone()); 26 | } 27 | 28 | currentQuad.addVertex(vert.clone()); 29 | } 30 | 31 | public void snip() { 32 | if ( currentQuad.isFull() ) { 33 | quads.add( currentQuad ); 34 | currentQuad = new Quad(); 35 | } 36 | } 37 | 38 | public ArrayList getQuads() { 39 | snip(); 40 | return quads; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/mesh/TriangleFan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.mesh; 12 | 13 | import java.util.ArrayList; 14 | 15 | public class TriangleFan { 16 | private ArrayList triangles = new ArrayList(); 17 | private Vertex firstVertex; 18 | private Vertex lastVertex; 19 | 20 | public void addVertex( Vertex vertex ) { 21 | if ( firstVertex == null ) { 22 | firstVertex = vertex; 23 | return; 24 | } 25 | if ( lastVertex == null ) { 26 | lastVertex = vertex; 27 | return; 28 | } 29 | 30 | Triangle t = new Triangle(); 31 | t.addVertex( firstVertex.clone() ); 32 | t.addVertex( lastVertex.clone() ); 33 | t.addVertex( vertex.clone() ); 34 | 35 | triangles.add(t); 36 | lastVertex = vertex; 37 | } 38 | 39 | public ArrayList getTriangles() { 40 | return triangles; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/mesh/mm3d/Mm3dGroup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.mesh.mm3d; 12 | 13 | import java.nio.ByteBuffer; 14 | 15 | public class Mm3dGroup { 16 | private int FLAGS; 17 | private String NAME; 18 | private int TRIANGLES; 19 | private int[] TRIANGLE_INDICES; 20 | private int SMOOTHNESS; 21 | private int MATERIAL; 22 | 23 | public Mm3dGroup(int a, String b, int c, int[] d, int e, int f) { 24 | this.FLAGS = a; 25 | this.NAME = b; 26 | this.TRIANGLES = c; 27 | this.TRIANGLE_INDICES = d; 28 | this.SMOOTHNESS = e; 29 | this.MATERIAL = f; 30 | } 31 | 32 | public String getName() { 33 | return this.NAME; 34 | } 35 | 36 | public int getTriangles() { 37 | return this.TRIANGLES; 38 | } 39 | 40 | public int[] getIndices() { 41 | return this.TRIANGLE_INDICES; 42 | } 43 | 44 | public int getMaterial() { 45 | return this.MATERIAL; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/mesh/mm3d/Mm3dSkeletalFrame.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.mesh.mm3d; 12 | 13 | import java.util.ArrayList; 14 | 15 | public class Mm3dSkeletalFrame { 16 | 17 | public ArrayList keyframes; 18 | 19 | public Mm3dSkeletalFrame() { 20 | this.keyframes = new ArrayList(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/mesh/mm3d/Mm3dTexture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.mesh.mm3d; 12 | 13 | import engine.gl.Resources; 14 | 15 | public class Mm3dTexture { 16 | private int flags; 17 | private String path; 18 | 19 | //private Texture2D diffuseTexture; 20 | 21 | public Mm3dTexture(String filePath, long getuInt16, String string) { 22 | this.flags = (int) getuInt16; 23 | this.path = string; 24 | 25 | String path = filePath + string; 26 | path = path.replace("\\", "/"); 27 | path = path.replace("/./", "/"); 28 | 29 | //if ( path.contains(".") ) 30 | // this.diffuseTexture = TextureUtils.loadSRGBTexture(path); 31 | //else 32 | //this.diffuseTexture = Resources.TEXTURE_WHITE_SRGB; 33 | } 34 | 35 | public String getFullPath() { 36 | return this.path; 37 | } 38 | 39 | //public Texture2D getDiffuseTexture() { 40 | // return diffuseTexture; 41 | //} 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/CubeMapTexture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | import static org.lwjgl.opengl.GL32C.*; 14 | 15 | public class CubeMapTexture extends Texture { 16 | 17 | public CubeMapTexture(int texture, int size) { 18 | super(texture, GL_TEXTURE_CUBE_MAP, size, size); 19 | } 20 | 21 | @Deprecated 22 | public int getSize() { 23 | return super.getWidth(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/IObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | public interface IObject { 14 | 15 | public void bind(); 16 | 17 | public void unbind(); 18 | 19 | public void dispose(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/IVisualObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | public interface IVisualObject extends IObject { 14 | 15 | public int getWidth(); 16 | 17 | public int getHeight(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/ParticleTexture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | public class ParticleTexture { 14 | 15 | private int numbreOfRows; 16 | private int id; 17 | 18 | public ParticleTexture(int id, int numbreOfRows) { 19 | this.id = id; 20 | this.numbreOfRows = numbreOfRows; 21 | } 22 | 23 | public int getID() { 24 | return id; 25 | } 26 | 27 | public int getNumbreOfRows() { 28 | return numbreOfRows; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/RawLTC.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | import static org.lwjgl.system.MemoryUtil.memFree; 14 | 15 | import java.nio.ByteBuffer; 16 | 17 | public class RawLTC extends RawTexture { 18 | 19 | public RawLTC(ByteBuffer buffer, int width, int height, int comp) { 20 | super(buffer, width, height, comp); 21 | } 22 | 23 | @Override 24 | public void dispose() { 25 | memFree(buffer); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/RawModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | public class RawModel { 14 | private int vaoID; 15 | private int vertexCount; 16 | 17 | public RawModel(int vaoID, int vertexCount) { 18 | this.vaoID = vaoID; 19 | this.vertexCount = vertexCount; 20 | } 21 | 22 | public int getVaoID() { 23 | return vaoID; 24 | } 25 | 26 | public int getVertexCount() { 27 | return vertexCount; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/objects/Renderbuffer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.objects; 12 | 13 | import static org.lwjgl.opengl.GL30C.glDeleteRenderbuffers; 14 | 15 | public class Renderbuffer { 16 | private int renderbuffer; 17 | 18 | public Renderbuffer(int renderbuffer) { 19 | this.renderbuffer = renderbuffer; 20 | } 21 | 22 | public void dispose() { 23 | glDeleteRenderbuffers(renderbuffer); 24 | } 25 | 26 | public int getRenderbuffer() { 27 | return renderbuffer; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/Bloom.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE0; 14 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE1; 15 | 16 | import engine.gl.DeferredPass; 17 | import engine.gl.DeferredPipeline; 18 | import engine.gl.RendererData; 19 | import engine.gl.objects.Texture; 20 | import engine.gl.pipeline.shaders.BloomShader; 21 | 22 | public class Bloom extends DeferredPass { 23 | 24 | public Bloom() { 25 | super("Bloom"); 26 | } 27 | 28 | @Override 29 | protected BloomShader setupShader() { 30 | return new BloomShader(); 31 | } 32 | 33 | @Override 34 | protected void setupTextures(RendererData rnd, DeferredPipeline dp, Texture[] auxTex) { 35 | auxTex[0].active(GL_TEXTURE0); 36 | auxTex[1].active(GL_TEXTURE1); 37 | auxTex[1] = auxTex[0]; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/BloomMask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE0; 14 | 15 | import engine.gl.DeferredPass; 16 | import engine.gl.DeferredPipeline; 17 | import engine.gl.RendererData; 18 | import engine.gl.objects.Texture; 19 | import engine.gl.pipeline.shaders.BloomMaskShader; 20 | 21 | public class BloomMask extends DeferredPass { 22 | 23 | public BloomMask() { 24 | super("BloomMask"); 25 | } 26 | 27 | @Override 28 | protected BloomMaskShader setupShader() { 29 | return new BloomMaskShader(); 30 | } 31 | 32 | @Override 33 | protected void setupTextures(RendererData rnd, DeferredPipeline dp, Texture[] auxTex) { 34 | auxTex[0].active(GL_TEXTURE0); 35 | auxTex[1] = auxTex[0]; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/ChromaticAberration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE0; 14 | 15 | import engine.gl.PostProcesPass; 16 | import engine.gl.PostProcessPipeline; 17 | import engine.gl.RendererData; 18 | import engine.gl.objects.Texture; 19 | import engine.gl.pipeline.shaders.BasicPostProcessShader; 20 | 21 | public class ChromaticAberration extends PostProcesPass { 22 | 23 | public ChromaticAberration() { 24 | super("ChromaticAberration"); 25 | } 26 | 27 | @Override 28 | protected BasicPostProcessShader setupShader() { 29 | return new BasicPostProcessShader(name); 30 | } 31 | 32 | @Override 33 | protected void setupTextures(RendererData rnd, PostProcessPipeline pp, Texture[] auxTex) { 34 | auxTex[0].active(GL_TEXTURE0); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/DepthOfField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE0; 14 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE1; 15 | 16 | import engine.gl.PostProcesPass; 17 | import engine.gl.PostProcessPipeline; 18 | import engine.gl.RendererData; 19 | import engine.gl.objects.Texture; 20 | import engine.gl.pipeline.shaders.DepthOfFieldShader; 21 | 22 | public class DepthOfField extends PostProcesPass { 23 | 24 | public DepthOfField() { 25 | super("DoF"); 26 | } 27 | 28 | @Override 29 | protected DepthOfFieldShader setupShader() { 30 | return new DepthOfFieldShader(); 31 | } 32 | 33 | @Override 34 | protected void setupTextures(RendererData rnd, PostProcessPipeline pp, Texture[] auxTex) { 35 | auxTex[0].active(GL_TEXTURE0); 36 | pp.getDepthTex().active(GL_TEXTURE1); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/MotionBlur.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE0; 14 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE1; 15 | 16 | import engine.gl.DeferredPass; 17 | import engine.gl.DeferredPipeline; 18 | import engine.gl.RendererData; 19 | import engine.gl.objects.Texture; 20 | import engine.gl.pipeline.shaders.MotionBlurShader; 21 | 22 | public class MotionBlur extends DeferredPass { 23 | 24 | public MotionBlur() { 25 | super("MotionBlur"); 26 | } 27 | 28 | @Override 29 | protected MotionBlurShader setupShader() { 30 | return new MotionBlurShader(); 31 | } 32 | 33 | @Override 34 | protected void setupTextures(RendererData rnd, DeferredPipeline dp, Texture[] auxTex) { 35 | auxTex[0].active(GL_TEXTURE0); 36 | dp.getMotionTex().active(GL_TEXTURE1); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/PostProcess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import engine.gl.PostProcessPipeline; 14 | 15 | public class PostProcess extends PostProcessPipeline { 16 | 17 | public PostProcess(int width, int height, long nvg) { 18 | super(width, height, nvg); 19 | } 20 | 21 | private FXAA fxaa; // Done 22 | private ChromaticAberration chromaticAberration; // Done 23 | private DepthOfField depthOfField; 24 | private FinalColorCorrection finalColorCorrection; 25 | 26 | @Override 27 | public void setupPasses() { 28 | finalColorCorrection = new FinalColorCorrection(); 29 | super.passes.add(finalColorCorrection); 30 | 31 | chromaticAberration = new ChromaticAberration(); 32 | super.passes.add(chromaticAberration); 33 | 34 | depthOfField = new DepthOfField(); 35 | super.passes.add(depthOfField); 36 | 37 | fxaa = new FXAA(); 38 | super.passes.add(fxaa); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/TAA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline; 12 | 13 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE0; 14 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE1; 15 | import static org.lwjgl.opengl.GL13C.GL_TEXTURE2; 16 | 17 | import engine.gl.DeferredPass; 18 | import engine.gl.DeferredPipeline; 19 | import engine.gl.RendererData; 20 | import engine.gl.objects.Texture; 21 | import engine.gl.pipeline.shaders.TAAShader; 22 | 23 | public class TAA extends DeferredPass { 24 | 25 | public TAA() { 26 | super("TAA"); 27 | } 28 | 29 | @Override 30 | protected TAAShader setupShader() { 31 | return new TAAShader(); 32 | } 33 | 34 | @Override 35 | protected void setupTextures(RendererData rnd, DeferredPipeline dp, Texture[] auxTex) { 36 | auxTex[0].active(GL_TEXTURE0); 37 | dp.getPreviousFrameTex().active(GL_TEXTURE1); 38 | dp.getMotionTex().active(GL_TEXTURE2); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/shaders/BasicPostProcessShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | 15 | import engine.gl.shaders.data.UniformSampler; 16 | 17 | public class BasicPostProcessShader extends BasePipelineShader { 18 | 19 | private UniformSampler image = new UniformSampler("image"); 20 | 21 | private String name; 22 | 23 | public BasicPostProcessShader(String name) { 24 | this.name = name; 25 | } 26 | 27 | @Override 28 | protected void setupShader() { 29 | super.setupShader(); 30 | super.addShader(new Shader("assets/shaders/postprocess/" + name + ".fs", GL_FRAGMENT_SHADER)); 31 | super.storeUniforms(image); 32 | } 33 | 34 | @Override 35 | protected void loadInitialData() { 36 | super.start(); 37 | image.loadTexUnit(0); 38 | super.stop(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/shaders/BloomMaskShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | 15 | import engine.gl.shaders.data.UniformSampler; 16 | 17 | public class BloomMaskShader extends BasePipelineShader { 18 | 19 | private UniformSampler image = new UniformSampler("image"); 20 | 21 | @Override 22 | protected void setupShader() { 23 | super.setupShader(); 24 | super.addShader(new Shader("assets/shaders/deferred/BloomMask.fs", GL_FRAGMENT_SHADER)); 25 | super.storeUniforms(image); 26 | } 27 | 28 | @Override 29 | protected void loadInitialData() { 30 | super.start(); 31 | image.loadTexUnit(0); 32 | super.stop(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/shaders/BloomShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | 15 | import engine.gl.shaders.data.UniformSampler; 16 | 17 | public class BloomShader extends BasePipelineShader { 18 | 19 | private UniformSampler base = new UniformSampler("base"); 20 | private UniformSampler bloom = new UniformSampler("bloom"); 21 | 22 | @Override 23 | protected void setupShader() { 24 | super.setupShader(); 25 | super.addShader(new Shader("assets/shaders/deferred/Bloom.fs", GL_FRAGMENT_SHADER)); 26 | super.storeUniforms(base, bloom); 27 | } 28 | 29 | @Override 30 | protected void loadInitialData() { 31 | super.start(); 32 | bloom.loadTexUnit(0); 33 | base.loadTexUnit(1); 34 | super.stop(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/shaders/DepthOfFieldShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | 15 | import engine.gl.shaders.data.UniformSampler; 16 | 17 | public class DepthOfFieldShader extends BasePipelineShader { 18 | 19 | private UniformSampler image = new UniformSampler("image"); 20 | private UniformSampler depth = new UniformSampler("depth"); 21 | 22 | @Override 23 | protected void setupShader() { 24 | super.setupShader(); 25 | super.addShader(new Shader("assets/shaders/postprocess/DoF.fs", GL_FRAGMENT_SHADER)); 26 | super.storeUniforms(image, depth); 27 | } 28 | 29 | @Override 30 | protected void loadInitialData() { 31 | super.start(); 32 | image.loadTexUnit(0); 33 | depth.loadTexUnit(1); 34 | super.stop(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/shaders/LensFlaresShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | 15 | import engine.gl.shaders.data.UniformSampler; 16 | 17 | public class LensFlaresShader extends BasePipelineShader { 18 | 19 | private UniformSampler bloom = new UniformSampler("bloom"); 20 | private UniformSampler lensColor = new UniformSampler("lensColor"); 21 | 22 | @Override 23 | protected void setupShader() { 24 | super.setupShader(); 25 | super.addShader(new Shader("assets/shaders/deferred/LensFlares.fs", GL_FRAGMENT_SHADER)); 26 | super.storeUniforms(bloom, lensColor); 27 | } 28 | 29 | @Override 30 | protected void loadInitialData() { 31 | super.start(); 32 | bloom.loadTexUnit(0); 33 | lensColor.loadTexUnit(1); 34 | super.stop(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/pipeline/shaders/MotionBlurShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.pipeline.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | 15 | import engine.gl.shaders.data.UniformSampler; 16 | 17 | public class MotionBlurShader extends BasePipelineShader { 18 | 19 | private UniformSampler image = new UniformSampler("image"); 20 | private UniformSampler gMotion = new UniformSampler("gMotion"); 21 | 22 | @Override 23 | protected void setupShader() { 24 | super.setupShader(); 25 | super.addShader(new Shader("assets/shaders/deferred/MotionBlur.fs", GL_FRAGMENT_SHADER)); 26 | this.storeUniforms(image, gMotion); 27 | } 28 | 29 | @Override 30 | protected void loadInitialData() { 31 | super.start(); 32 | image.loadTexUnit(0); 33 | gMotion.loadTexUnit(1); 34 | super.stop(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/renderers/shaders/AnimInstanceBaseShadowShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.renderers.shaders; 12 | 13 | import java.nio.FloatBuffer; 14 | 15 | import engine.gl.shaders.data.Attribute; 16 | import engine.gl.shaders.data.UniformMatrix4; 17 | 18 | public class AnimInstanceBaseShadowShader extends InstanceBaseShadowShader { 19 | 20 | private UniformMatrix4 boneMat = new UniformMatrix4("boneMat"); 21 | 22 | @Override 23 | protected void setupShader() { 24 | super.setupShader(); 25 | super.setAttributes(new Attribute(0, "position"), new Attribute(1, "normals"), new Attribute(2, "tangent"), 26 | new Attribute(3, "textureCoords"), new Attribute(4, "inColor"), new Attribute(5, "boneIndices"), 27 | new Attribute(6, "boneWeights")); 28 | super.storeUniforms(boneMat); 29 | } 30 | 31 | public void loadBoneMat(FloatBuffer mat) { 32 | boneMat.loadMatrix(mat); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/BRDFIntegrationMapShader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders; 12 | 13 | import static org.lwjgl.opengl.GL20C.GL_FRAGMENT_SHADER; 14 | import static org.lwjgl.opengl.GL20C.GL_VERTEX_SHADER; 15 | 16 | import engine.gl.shaders.data.Attribute; 17 | 18 | public class BRDFIntegrationMapShader extends ShaderProgram { 19 | 20 | @Override 21 | protected void setupShader() { 22 | super.addShader(new Shader("assets/shaders/BRDFIntegrationMap.vs", GL_VERTEX_SHADER)); 23 | super.addShader(new Shader("assets/shaders/BRDFIntegrationMap.fs", GL_FRAGMENT_SHADER)); 24 | super.setAttributes(new Attribute(0, "position")); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/Attribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | public class Attribute { 14 | 15 | private int id; 16 | private String name; 17 | 18 | public Attribute(int id, String name) { 19 | this.id = id; 20 | this.name = name; 21 | } 22 | 23 | public int getId() { 24 | return id; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/IUniform.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | public interface IUniform { 14 | 15 | public void storeUniformLocation(int programID); 16 | 17 | public void dispose(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/Uniform.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glGetUniformLocation; 14 | 15 | public abstract class Uniform implements IUniform { 16 | 17 | protected String name; 18 | protected boolean used = false; 19 | private int location; 20 | 21 | protected Uniform(String name) { 22 | this.name = name; 23 | } 24 | 25 | @Override 26 | public void storeUniformLocation(int programID) { 27 | location = glGetUniformLocation(programID, name); 28 | used = false; 29 | } 30 | 31 | @Override 32 | public void dispose() { 33 | } 34 | 35 | protected int getLocation() { 36 | return location; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformBoolean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform1i; 14 | 15 | public class UniformBoolean extends Uniform { 16 | 17 | private boolean currentBool; 18 | 19 | public UniformBoolean(String name) { 20 | super(name); 21 | } 22 | 23 | public void loadBoolean(boolean bool) { 24 | if (!used || currentBool != bool) { 25 | glUniform1i(super.getLocation(), bool ? 1 : 0); 26 | used = true; 27 | currentBool = bool; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformDynamicSky.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import engine.lua.type.object.insts.DynamicSkybox; 14 | 15 | public class UniformDynamicSky extends UniformObject { 16 | 17 | private UniformFloat brightness, time, cloudHeight, cloudSpeed; 18 | 19 | public UniformDynamicSky(String name) { 20 | brightness = new UniformFloat(name + ".brightness"); 21 | time = new UniformFloat(name + ".time"); 22 | cloudHeight = new UniformFloat(name + ".cloudHeight"); 23 | cloudSpeed = new UniformFloat(name + ".cloudSpeed"); 24 | super.storeUniforms(brightness, time, cloudHeight, cloudSpeed); 25 | } 26 | 27 | public void loadLight(DynamicSkybox sky) { 28 | brightness.loadFloat(sky.getBrightness()); 29 | time.loadFloat(sky.getTime()); 30 | cloudHeight.loadFloat(sky.getCloudHeight()); 31 | cloudSpeed.loadFloat(sky.getCloudSpeed()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformFloat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform1f; 14 | 15 | public class UniformFloat extends Uniform { 16 | 17 | private float currentValue; 18 | 19 | public UniformFloat(String name) { 20 | super(name); 21 | } 22 | 23 | public void loadFloat(float value) { 24 | if (!used || currentValue != value) { 25 | glUniform1f(super.getLocation(), value); 26 | used = true; 27 | currentValue = value; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformInteger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform1i; 14 | 15 | public class UniformInteger extends Uniform { 16 | 17 | private int currentValue; 18 | 19 | public UniformInteger(String name) { 20 | super(name); 21 | } 22 | 23 | public void loadInteger(int value) { 24 | if (!used || currentValue != value) { 25 | glUniform1i(super.getLocation(), value); 26 | used = true; 27 | currentValue = value; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformMatrix3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniformMatrix3fv; 14 | 15 | import org.joml.Matrix3f; 16 | 17 | public class UniformMatrix3 extends Uniform { 18 | 19 | private Matrix3f current = new Matrix3f(); 20 | private float[] fm = new float[9]; 21 | 22 | public UniformMatrix3(String name) { 23 | super(name); 24 | } 25 | 26 | public void loadMatrix(Matrix3f matrix) { 27 | if (!used || !matrix.equals(current)) { 28 | current.set(matrix); 29 | matrix.get(fm); 30 | glUniformMatrix3fv(super.getLocation(), false, fm); 31 | used = true; 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformMatrix4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniformMatrix4fv; 14 | 15 | import java.nio.FloatBuffer; 16 | 17 | import org.joml.Matrix4f; 18 | 19 | public class UniformMatrix4 extends Uniform { 20 | 21 | private Matrix4f current = new Matrix4f(); 22 | private float[] fm = new float[16]; 23 | 24 | public UniformMatrix4(String name) { 25 | super(name); 26 | } 27 | 28 | public void loadMatrix(Matrix4f matrix) { 29 | if (!used || !matrix.equals(current)) { 30 | current.set(matrix); 31 | matrix.get(fm); 32 | glUniformMatrix4fv(super.getLocation(), false, fm); 33 | used = true; 34 | } 35 | } 36 | 37 | //TODO: Optimize 38 | public void loadMatrix(FloatBuffer matrix) { 39 | glUniformMatrix4fv(super.getLocation(), false, matrix); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import java.util.ArrayList; 14 | import java.util.Arrays; 15 | import java.util.List; 16 | 17 | public class UniformObject implements IUniform { 18 | 19 | private List uniforms = new ArrayList<>();; 20 | 21 | public void storeUniforms(Uniform... uniforms) { 22 | this.uniforms.addAll(Arrays.asList(uniforms)); 23 | } 24 | 25 | @Override 26 | public void storeUniformLocation(int programID) { 27 | for (Uniform uniform : uniforms) 28 | uniform.storeUniformLocation(programID); 29 | } 30 | 31 | @Override 32 | public void dispose() { 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformSampler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform1i; 14 | 15 | public class UniformSampler extends Uniform { 16 | 17 | private int currentValue; 18 | 19 | public UniformSampler(String name) { 20 | super(name); 21 | } 22 | 23 | public void loadTexUnit(int texUnit) { 24 | if (!used || currentValue != texUnit) { 25 | glUniform1i(super.getLocation(), texUnit); 26 | used = true; 27 | currentValue = texUnit; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformVec2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform2f; 14 | 15 | import org.joml.Vector2f; 16 | 17 | public class UniformVec2 extends Uniform { 18 | 19 | private float currentX; 20 | private float currentY; 21 | 22 | public UniformVec2(String name) { 23 | super(name); 24 | } 25 | 26 | public void loadVec2(Vector2f vector) { 27 | loadVec2(vector.x, vector.y); 28 | } 29 | 30 | public void loadVec2(float x, float y) { 31 | if (!used || x != currentX || y != currentY) { 32 | this.currentX = x; 33 | this.currentY = y; 34 | used = true; 35 | glUniform2f(super.getLocation(), x, y); 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformVec3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform3f; 14 | 15 | import org.joml.Vector3f; 16 | 17 | public class UniformVec3 extends Uniform { 18 | 19 | private float currentX; 20 | private float currentY; 21 | private float currentZ; 22 | 23 | public UniformVec3(String name) { 24 | super(name); 25 | } 26 | 27 | public void loadVec3(Vector3f vector) { 28 | loadVec3(vector.x, vector.y, vector.z); 29 | } 30 | 31 | public void loadVec3(float x, float y, float z) { 32 | if (!used || x != currentX || y != currentY || z != currentZ) { 33 | this.currentX = x; 34 | this.currentY = y; 35 | this.currentZ = z; 36 | used = true; 37 | glUniform3f(super.getLocation(), x, y, z); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/engine/gl/shaders/data/UniformVec4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.gl.shaders.data; 12 | 13 | import static org.lwjgl.opengl.GL20C.glUniform4f; 14 | 15 | import org.joml.Vector4f; 16 | 17 | public class UniformVec4 extends Uniform { 18 | 19 | private float currentX; 20 | private float currentY; 21 | private float currentZ; 22 | private float currentW; 23 | 24 | public UniformVec4(String name) { 25 | super(name); 26 | } 27 | 28 | public void loadVec4(Vector4f vector) { 29 | loadVec4(vector.x, vector.y, vector.z, vector.w); 30 | } 31 | 32 | public void loadVec4(float x, float y, float z, float w) { 33 | if (!used || x != currentX || y != currentY || z != currentZ || w != currentW) { 34 | this.currentX = x; 35 | this.currentY = y; 36 | this.currentZ = z; 37 | this.currentW = w; 38 | used = true; 39 | glUniform4f(super.getLocation(), x, y, z, w); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/engine/io/FileResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.io; 12 | 13 | public interface FileResource { 14 | public String getFilePath(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/RunnableArgs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | @FunctionalInterface 16 | public interface RunnableArgs { 17 | public abstract void run(LuaValue[] args); 18 | } -------------------------------------------------------------------------------- /src/main/java/engine/lua/history/HistorySnapshot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.history; 12 | 13 | import java.util.ArrayList; 14 | 15 | public class HistorySnapshot { 16 | public ArrayList changes = new ArrayList(); 17 | 18 | public void addChange(HistoryChange change) { 19 | changes.add(change); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/lib/EnumType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.lib; 12 | 13 | public class EnumType extends LuaTableReadOnly { 14 | private String type; 15 | 16 | public EnumType(String string) { 17 | this.type = string; 18 | } 19 | 20 | public String getType() { 21 | return this.type; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/lib/LuaTableReadOnly.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.lib; 12 | 13 | import org.luaj.vm2.LuaTable; 14 | import org.luaj.vm2.LuaValue; 15 | 16 | // Simple read-only table. Raw-setting is permitted. 17 | public class LuaTableReadOnly extends LuaTable { 18 | public LuaValue setmetatable(LuaValue metatable) { return error("table is read-only"); } 19 | public void set(int key, LuaValue value) { error("table is read-only"); } 20 | public LuaValue remove(int pos) { return error("table is read-only"); } 21 | } -------------------------------------------------------------------------------- /src/main/java/engine/lua/lib/ScriptInterruptException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.lib; 12 | public class ScriptInterruptException extends RuntimeException { 13 | private static final long serialVersionUID = 1L; 14 | } -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/UUIDSerializable.java: -------------------------------------------------------------------------------- 1 | package engine.lua.network; 2 | 3 | import java.util.UUID; 4 | 5 | public class UUIDSerializable { 6 | public long leastBits; 7 | public long mostBits; 8 | 9 | public UUIDSerializable() { 10 | // For Kryonet serialization 11 | } 12 | 13 | public UUIDSerializable(UUID uuid) { 14 | this.leastBits = uuid.getLeastSignificantBits(); 15 | this.mostBits = uuid.getMostSignificantBits(); 16 | } 17 | 18 | public UUID getUUID() { 19 | return new UUID(mostBits, leastBits); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/ClientProcessable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal; 12 | 13 | import com.esotericsoftware.kryonet.Connection; 14 | 15 | public interface ClientProcessable { 16 | public void clientProcess(Connection Connection); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/NonReplicatable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal; 12 | 13 | /** 14 | * Objects that implement this will not have network replication 15 | * for any fields inside it except NAME/PARENT! 16 | * @author ahamilton 17 | * 18 | */ 19 | public interface NonReplicatable { 20 | // 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/ServerProcessable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal; 12 | 13 | import com.esotericsoftware.kryonet.Connection; 14 | 15 | public interface ServerProcessable { 16 | public void serverProcess(Connection Connection); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/protocol/ClientConnectTCP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal.protocol; 12 | 13 | public class ClientConnectTCP { 14 | public final String username; 15 | public final String version; 16 | public final String data; 17 | 18 | public ClientConnectTCP() { 19 | username = "Test"; 20 | version = ""; 21 | data = ""; 22 | } 23 | 24 | public ClientConnectTCP(String username, String version, String data) { 25 | this.username = username; 26 | this.version = version; 27 | this.data = data; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/protocol/ClientLoadMapTCP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal.protocol; 12 | 13 | public class ClientLoadMapTCP { 14 | public String data; 15 | public boolean finished; 16 | 17 | public ClientLoadMapTCP() { 18 | // 19 | } 20 | 21 | public ClientLoadMapTCP(String data) { 22 | this.data = data; 23 | } 24 | 25 | public ClientLoadMapTCP(boolean finished) { 26 | this.finished = true; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/protocol/InstanceDestroyTCP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal.protocol; 12 | 13 | import com.esotericsoftware.kryonet.Connection; 14 | 15 | import engine.Game; 16 | import engine.lua.network.UUIDSerializable; 17 | import engine.lua.network.internal.ClientProcessable; 18 | import engine.lua.type.object.Instance; 19 | 20 | public class InstanceDestroyTCP implements ClientProcessable { 21 | public long instanceId; 22 | public UUIDSerializable instanceUUID; 23 | 24 | public InstanceDestroyTCP() { 25 | instanceId = -1; 26 | } 27 | 28 | public InstanceDestroyTCP(Instance instance) { 29 | this.instanceUUID = new UUIDSerializable(instance.getUUID()); 30 | } 31 | 32 | @Override 33 | public void clientProcess(Connection Connection) { 34 | Instance instance = Game.getInstanceFromUUID(this.instanceUUID.getUUID()); 35 | if ( instance != null ) 36 | instance.destroy(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/network/internal/protocol/TestProtocol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.network.internal.protocol; 12 | 13 | import com.esotericsoftware.kryonet.Connection; 14 | 15 | import engine.lua.network.internal.ClientProcessable; 16 | 17 | public class TestProtocol implements ClientProcessable { 18 | public String var = "Yay!"; 19 | 20 | public TestProtocol() { 21 | var = "Nay! :("; 22 | } 23 | 24 | @Override 25 | public void clientProcess(Connection Connection) { 26 | System.out.println(var); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/Clamp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | public abstract class Clamp { 16 | public abstract LuaValue clamp(LuaValue value); 17 | public abstract T getMin(); 18 | public abstract T getMax(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/LuaFieldFlag.java: -------------------------------------------------------------------------------- 1 | package engine.lua.type; 2 | 3 | public class LuaFieldFlag { 4 | /** 5 | * This flag controls whether the client will try to replicate this field (to the server) when it changes. 6 | */ 7 | public static final int CLIENT_SIDE_REPLICATE = 0x00000001; 8 | 9 | /** 10 | * Similar to {@link #CLIENT_SIDE_REPLICATE}. However it must be replicated from client-to-serve manually. 11 | */ 12 | public static final int CLIENT_SIDE_REPLICATE_MANUAL = 0x00000002; 13 | 14 | /** 15 | * Flag that represents a field that are common among ALL datamodels. 16 | */ 17 | public static final int CORE_FIELD = 0x00000004; 18 | 19 | /** 20 | * Flag that makes a field hidden from properties window. 21 | */ 22 | public static final int FIELD_HIDDEN = 0x00000008; 23 | 24 | /** 25 | * Flag that makes a field non-copyable when its parent instance of copied. 26 | */ 27 | public static final int CANT_COPY = 0x00000010; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/NumberClamp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | public class NumberClamp extends Clamp { 16 | private float min; 17 | private float max; 18 | 19 | public NumberClamp(float min, float max) { 20 | this.min = min; 21 | this.max = max; 22 | } 23 | 24 | @Override 25 | public LuaValue clamp(LuaValue value) { 26 | return LuaValue.valueOf(Math.min(getMax(), Math.max(getMin(), value.tofloat()))); 27 | } 28 | 29 | @Override 30 | public Float getMin() { 31 | return min; 32 | } 33 | 34 | @Override 35 | public Float getMax() { 36 | return max; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/NumberClampPreferred.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type; 12 | 13 | public class NumberClampPreferred extends NumberClamp { 14 | private float preferredMin; 15 | private float preferredMax; 16 | 17 | public NumberClampPreferred(float min, float max, float preferredMin, float preferredMax) { 18 | super(min,max); 19 | 20 | this.preferredMin = preferredMin; 21 | this.preferredMax = preferredMax; 22 | } 23 | 24 | public float getPreferredMin() { 25 | return this.preferredMin; 26 | } 27 | 28 | public float getPreferredMax() { 29 | return this.preferredMax; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/data/ColorBase.java: -------------------------------------------------------------------------------- 1 | package engine.lua.type.data; 2 | 3 | import engine.lua.type.LuaValuetype; 4 | import lwjgui.paint.Color; 5 | 6 | public abstract class ColorBase extends LuaValuetype { 7 | public abstract Color toColor(); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/InstancePropertySubscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | public interface InstancePropertySubscriber { 16 | public void onPropertyChange(Instance instance, LuaValue key, LuaValue value); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/Positionable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object; 12 | 13 | import org.joml.Vector3f; 14 | 15 | import engine.lua.type.data.Matrix4; 16 | import engine.lua.type.data.Vector3; 17 | import engine.util.Pair; 18 | 19 | public interface Positionable { 20 | public Vector3 getPosition(); 21 | public void setPosition(Vector3 position); 22 | public Matrix4 getWorldMatrix(); 23 | public void setWorldMatrix(Matrix4 matrix); 24 | public Pair getAABB(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/SceneStorable.java: -------------------------------------------------------------------------------- 1 | package engine.lua.type.object; 2 | 3 | public interface SceneStorable { 4 | // 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/ScriptExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object; 12 | 13 | /** 14 | * Interface used to mark whether a script, when it descends this object, may be executed. 15 | * @author Andrew 16 | * 17 | */ 18 | public interface ScriptExecutor { 19 | // 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/Service.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object; 12 | 13 | public abstract class Service extends Instance { 14 | 15 | public Service(String name) { 16 | super(name); 17 | this.setInstanceable(false); 18 | 19 | this.getField(C_NAME).setLocked(true); 20 | this.getField(C_PARENT).setLocked(true); 21 | this.getField(C_ARCHIVABLE).setLocked(true); 22 | 23 | this.setLocked(true); 24 | } 25 | 26 | public void onDestroy() { 27 | // 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/TreeInvisible.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object; 12 | 13 | public interface TreeInvisible { 14 | // 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/TreeViewable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object; 12 | 13 | import ide.layout.windows.icons.Icons; 14 | 15 | public interface TreeViewable { 16 | public Icons getIcon(); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/AudioPlayer2D.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts; 12 | 13 | import engine.lua.type.object.AudioPlayerBase; 14 | 15 | public class AudioPlayer2D extends AudioPlayerBase { 16 | public AudioPlayer2D() { 17 | super("AudioPlayer2D"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/Folder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import engine.lua.type.object.Instance; 16 | import engine.lua.type.object.TreeViewable; 17 | import ide.layout.windows.icons.Icons; 18 | 19 | public class Folder extends Instance implements TreeViewable { 20 | 21 | public Folder() { 22 | super("Folder"); 23 | } 24 | 25 | @Override 26 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 27 | return value; 28 | } 29 | 30 | @Override 31 | protected boolean onValueGet(LuaValue key) { 32 | return true; 33 | } 34 | 35 | @Override 36 | public void onDestroy() { 37 | // 38 | } 39 | 40 | @Override 41 | public Icons getIcon() { 42 | return Icons.icon_folder; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/PlayerConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | import engine.lua.network.internal.NonReplicatable; 15 | import engine.lua.type.object.TreeViewable; 16 | import ide.layout.windows.icons.Icons; 17 | 18 | public class PlayerConnection extends Connection implements TreeViewable,NonReplicatable { 19 | 20 | public PlayerConnection( com.esotericsoftware.kryonet.Connection kryoConnection) { 21 | this(); 22 | this.kryoConnection = kryoConnection; 23 | this.rawset("Address", LuaValue.valueOf(kryoConnection.getRemoteAddressTCP().getAddress().getHostAddress())); 24 | 25 | this.setInstanceable(false); 26 | } 27 | 28 | public PlayerConnection() { 29 | super("PlayerConnection"); 30 | } 31 | 32 | @Override 33 | public Icons getIcon() { 34 | return Icons.icon_network_player; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/Scene.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import engine.lua.type.object.Instance; 16 | import engine.lua.type.object.TreeViewable; 17 | import ide.layout.windows.icons.Icons; 18 | 19 | public class Scene extends Instance implements TreeViewable { 20 | 21 | public Scene() { 22 | super("Scene"); 23 | 24 | this.setArchivable(true); 25 | this.getField(C_ARCHIVABLE).setLocked(true); 26 | this.setInstanceable(false); 27 | } 28 | 29 | @Override 30 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 31 | return value; 32 | } 33 | 34 | @Override 35 | protected boolean onValueGet(LuaValue key) { 36 | return true; 37 | } 38 | 39 | @Override 40 | public void onDestroy() { 41 | // 42 | } 43 | 44 | @Override 45 | public Icons getIcon() { 46 | return Icons.icon_world; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/animation/BoneTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.animation; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | import engine.lua.type.object.Instance; 15 | import engine.lua.type.object.TreeViewable; 16 | import ide.layout.windows.icons.Icons; 17 | 18 | public class BoneTree extends Instance implements TreeViewable { 19 | 20 | public BoneTree() { 21 | super("BoneTree"); 22 | 23 | this.setInstanceable(false); 24 | 25 | this.getField(LuaValue.valueOf("Archivable")).setLocked(true); 26 | } 27 | 28 | @Override 29 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 30 | return value; 31 | } 32 | 33 | @Override 34 | protected boolean onValueGet(LuaValue key) { 35 | return true; 36 | } 37 | 38 | @Override 39 | public void onDestroy() { 40 | // 41 | } 42 | 43 | @Override 44 | public Icons getIcon() { 45 | return Icons.icon_animation_data; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/animation/BoneTreeNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.animation; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | import engine.lua.type.object.Instance; 15 | import engine.lua.type.object.TreeViewable; 16 | import ide.layout.windows.icons.Icons; 17 | 18 | public class BoneTreeNode extends Instance implements TreeViewable { 19 | 20 | public BoneTreeNode() { 21 | super("BoneTreeNode"); 22 | 23 | this.setInstanceable(false); 24 | 25 | this.getField(LuaValue.valueOf("Archivable")).setLocked(true); 26 | } 27 | 28 | @Override 29 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 30 | return value; 31 | } 32 | 33 | @Override 34 | protected boolean onValueGet(LuaValue key) { 35 | return true; 36 | } 37 | 38 | @Override 39 | public void onDestroy() { 40 | // 41 | } 42 | 43 | @Override 44 | public Icons getIcon() { 45 | return Icons.icon_film; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/script/GlobalScript.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.script; 12 | 13 | import engine.lua.type.object.ScriptBase; 14 | import engine.lua.type.object.TreeViewable; 15 | import ide.layout.windows.icons.Icons; 16 | 17 | public class GlobalScript extends ScriptBase implements TreeViewable { 18 | 19 | public GlobalScript() { 20 | super("GlobalScript"); 21 | } 22 | 23 | @Override 24 | public Icons getIcon() { 25 | return Icons.icon_script_global; 26 | } 27 | 28 | @Override 29 | public boolean getCanRun() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/script/LocalScript.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.script; 12 | 13 | import engine.Game; 14 | import engine.lua.type.object.ScriptBase; 15 | import engine.lua.type.object.TreeViewable; 16 | import ide.layout.windows.icons.Icons; 17 | 18 | public class LocalScript extends ScriptBase implements TreeViewable { 19 | 20 | public LocalScript() { 21 | super("LocalScript"); 22 | } 23 | 24 | @Override 25 | public Icons getIcon() { 26 | return Icons.icon_script_local; 27 | } 28 | 29 | @Override 30 | public boolean getCanRun() { 31 | return !Game.isServer() || Game.internalTesting; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/script/Script.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.script; 12 | 13 | import engine.Game; 14 | import engine.lua.network.internal.NonReplicatable; 15 | import engine.lua.type.object.ScriptBase; 16 | import engine.lua.type.object.TreeViewable; 17 | import ide.layout.windows.icons.Icons; 18 | 19 | public class Script extends ScriptBase implements TreeViewable,NonReplicatable { 20 | 21 | public Script() { 22 | super("Script"); 23 | } 24 | 25 | @Override 26 | public Icons getIcon() { 27 | return Icons.icon_script; 28 | } 29 | 30 | @Override 31 | public boolean getCanRun() { 32 | return Game.isServer() || Game.internalTesting; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/ui/HBox.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.ui; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import ide.layout.windows.icons.Icons; 16 | import lwjgui.scene.layout.Pane; 17 | 18 | public class HBox extends GuiBasePane { 19 | 20 | public HBox() { 21 | super("HBox"); 22 | } 23 | 24 | @Override 25 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 26 | return value; 27 | } 28 | 29 | @Override 30 | protected boolean onValueGet(LuaValue key) { 31 | return true; 32 | } 33 | 34 | @Override 35 | public void onDestroy() { 36 | // 37 | } 38 | 39 | @Override 40 | public Icons getIcon() { 41 | return Icons.icon_hbox; 42 | } 43 | 44 | @Override 45 | public Pane getUINode() { 46 | return new lwjgui.scene.layout.HBox(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/ui/VBox.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.insts.ui; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import ide.layout.windows.icons.Icons; 16 | import lwjgui.scene.layout.Pane; 17 | 18 | public class VBox extends GuiBasePane { 19 | 20 | public VBox() { 21 | super("VBox"); 22 | } 23 | 24 | @Override 25 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 26 | return value; 27 | } 28 | 29 | @Override 30 | protected boolean onValueGet(LuaValue key) { 31 | return true; 32 | } 33 | 34 | @Override 35 | public void onDestroy() { 36 | // 37 | } 38 | 39 | @Override 40 | public Icons getIcon() { 41 | return Icons.icon_vbox; 42 | } 43 | 44 | @Override 45 | public Pane getUINode() { 46 | return new lwjgui.scene.layout.VBox(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/insts/values/ValueBase.java: -------------------------------------------------------------------------------- 1 | package engine.lua.type.object.insts.values; 2 | 3 | import engine.lua.type.object.Instance; 4 | 5 | public abstract class ValueBase extends Instance { 6 | 7 | public ValueBase(String name) { 8 | super(name); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/services/Core.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.services; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import engine.lua.type.object.ScriptExecutor; 16 | import engine.lua.type.object.Service; 17 | import engine.lua.type.object.TreeInvisible; 18 | 19 | public class Core extends Service implements TreeInvisible,ScriptExecutor { 20 | 21 | public Core() { 22 | super("Core"); 23 | } 24 | 25 | @Override 26 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 27 | return value; 28 | } 29 | 30 | @Override 31 | protected boolean onValueGet(LuaValue key) { 32 | return true; 33 | } 34 | 35 | public RenderSettings getRenderSettings() { 36 | return (RenderSettings) this.get("RenderSettings"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/services/ScriptService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.services; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import engine.lua.type.object.SceneStorable; 16 | import engine.lua.type.object.ScriptExecutor; 17 | import engine.lua.type.object.Service; 18 | import engine.lua.type.object.TreeViewable; 19 | import ide.layout.windows.icons.Icons; 20 | 21 | public class ScriptService extends Service implements TreeViewable,ScriptExecutor,SceneStorable { 22 | 23 | public ScriptService() { 24 | super("ScriptService"); 25 | } 26 | 27 | @Override 28 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 29 | return value; 30 | } 31 | 32 | @Override 33 | protected boolean onValueGet(LuaValue key) { 34 | return true; 35 | } 36 | 37 | @Override 38 | public Icons getIcon() { 39 | return Icons.icon_script_service; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/engine/lua/type/object/services/Storage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.lua.type.object.services; 12 | 13 | import org.luaj.vm2.LuaValue; 14 | 15 | import engine.lua.type.object.SceneStorable; 16 | import engine.lua.type.object.Service; 17 | import engine.lua.type.object.TreeViewable; 18 | import ide.layout.windows.icons.Icons; 19 | 20 | public class Storage extends Service implements TreeViewable,SceneStorable { 21 | 22 | public Storage() { 23 | super("Storage"); 24 | } 25 | 26 | @Override 27 | protected LuaValue onValueSet(LuaValue key, LuaValue value) { 28 | return value; 29 | } 30 | 31 | @Override 32 | protected boolean onValueGet(LuaValue key) { 33 | return true; 34 | } 35 | 36 | @Override 37 | public Icons getIcon() { 38 | return Icons.icon_storage; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/InternalRenderable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | public interface InternalRenderable { 14 | public void internalRender(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/PostRenderable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | public interface PostRenderable { 14 | public void postRender(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/Renderable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | public interface Renderable { 14 | public void render(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/RenderableInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | import engine.lua.type.data.Matrix4; 14 | import engine.lua.type.object.insts.Prefab; 15 | 16 | public interface RenderableInstance { 17 | public Prefab getPrefab(); 18 | public Matrix4 getWorldMatrix(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/RenderableMesh.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | public interface RenderableMesh { 14 | public void render(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/RenderableWorld.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | import engine.lua.type.object.Instance; 14 | import engine.lua.type.object.insts.Camera; 15 | 16 | public interface RenderableWorld { 17 | public Camera getCurrentCamera(); 18 | public Instance getInstance(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/engine/observer/Tickable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.observer; 12 | 13 | public interface Tickable { 14 | public void tick(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/engine/physics/SoundMaterial.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.physics; 12 | 13 | public class SoundMaterial { 14 | private final String name; 15 | private final String directory; 16 | 17 | public SoundMaterial(String name, String directory) { 18 | this.name = name; 19 | this.directory = directory; 20 | } 21 | 22 | public String getDirectory() { 23 | return directory + name + "/"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/engine/resources/IResourcesManagerBackend.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.resources; 12 | 13 | import engine.gl.objects.RawTexture; 14 | 15 | public interface IResourcesManagerBackend { 16 | 17 | public int loadTexture(int filter, int textureWarp, int format, int type, boolean textureMipMapAF, RawTexture data); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/engine/tasks/ITaskRunnerThread.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.tasks; 12 | 13 | public interface ITaskRunnerThread { 14 | 15 | public void setRunning(boolean running); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/engine/tasks/OnFinished.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.tasks; 12 | 13 | public interface OnFinished { 14 | 15 | public void onFinished(T value); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/engine/tasks/ThreadUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.tasks; 12 | 13 | public class ThreadUtils { 14 | 15 | private ThreadUtils() { 16 | } 17 | 18 | public static void sleep(long millis) { 19 | try { 20 | Thread.sleep(millis); 21 | } catch (InterruptedException e) { 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/engine/util/IOUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.util; 12 | 13 | import java.io.File; 14 | import java.net.MalformedURLException; 15 | import java.net.URL; 16 | 17 | public final class IOUtil { 18 | 19 | public static URL ioResourceGetURL( String resource ) { 20 | // Search inside jar 21 | URL url = IOUtil.class.getClassLoader().getResource(resource); 22 | 23 | // File not found. Search outside jar 24 | if (url == null) { 25 | try { 26 | url = new File(resource).toURI().toURL(); 27 | } catch (MalformedURLException e) { 28 | // NO FILE 29 | return null; 30 | } 31 | } 32 | 33 | // Return url; 34 | return url; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/engine/util/Misc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.util; 12 | 13 | import java.math.BigDecimal; 14 | 15 | public class Misc { 16 | public static BigDecimal truncateDecimal(double x,int numberofDecimals) { 17 | if ( x > 0) { 18 | return new BigDecimal(String.valueOf(x)).setScale(numberofDecimals, BigDecimal.ROUND_FLOOR); 19 | } else { 20 | return new BigDecimal(String.valueOf(x)).setScale(numberofDecimals, BigDecimal.ROUND_CEILING); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/engine/util/NanoVGUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.util; 12 | 13 | import org.lwjgl.nanovg.NVGColor; 14 | 15 | public class NanoVGUtil { 16 | public static NVGColor color( int r, int g, int b, int a ) { 17 | NVGColor ret = NVGColor.create(); 18 | ret.r(r/255.0f); 19 | ret.g(g/255.0f); 20 | ret.b(b/255.0f); 21 | ret.a(a/255.0f); 22 | 23 | return ret; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/engine/util/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package engine.util; 12 | 13 | public class Pair { 14 | private T1 value1; 15 | private T2 value2; 16 | 17 | public Pair(T1 value1, T2 value2) { 18 | this.value1 = value1; 19 | this.value2 = value2; 20 | } 21 | 22 | public T1 value1() { 23 | return value1; 24 | } 25 | 26 | public T2 value2() { 27 | return value2; 28 | } 29 | 30 | 31 | @Override 32 | public String toString() { 33 | return "(" + value1 + ", " + value2 + ")"; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/ide/IDEDebug.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package ide; 12 | 13 | import java.io.IOException; 14 | 15 | public class IDEDebug { 16 | public static void main(String[] args) throws IOException { 17 | IDE.main(args); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/ide/layout/IdePane.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | * 5 | * This Source Code Form is subject to the terms of the Mozilla Public 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this 7 | * file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | * 9 | */ 10 | 11 | package ide.layout; 12 | 13 | import lwjgui.geometry.Insets; 14 | import lwjgui.geometry.Pos; 15 | import lwjgui.scene.layout.StackPane; 16 | 17 | public abstract class IdePane extends StackPane { 18 | public String paneName; 19 | public boolean closable; 20 | public IdeDockPane dockedTo; 21 | 22 | public IdePane(String name, boolean closable) { 23 | this.paneName = name; 24 | this.closable = closable; 25 | 26 | setPadding(Insets.EMPTY); 27 | setAlignment(Pos.TOP_LEFT); 28 | 29 | this.setFillToParentHeight(true); 30 | this.setFillToParentWidth(true); 31 | } 32 | 33 | public String getName() { 34 | return paneName; 35 | } 36 | 37 | public abstract void onOpen(); 38 | public abstract void onClose(); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/ide/layout/windows/code/AutoSyntaxCodeEditor.java: -------------------------------------------------------------------------------- 1 | package ide.layout.windows.code; 2 | 3 | public abstract class AutoSyntaxCodeEditor extends SearchableCodeEditor { 4 | /** 5 | * Returns the amount of tabs that are at the start of the specified string. 6 | * @param t 7 | * @return 8 | */ 9 | protected int countCharacters(String t, char ch) { 10 | int a = 0; 11 | for (int i = 0; i < t.length(); i++) { 12 | char c = t.charAt(i); 13 | if (c == ch) 14 | a++; 15 | else 16 | break; 17 | } 18 | 19 | return a; 20 | } 21 | 22 | /** 23 | * Method to generate n amount of characters as a string. 24 | * @param amt 25 | * @param c 26 | * @return 27 | */ 28 | protected String generateCharacters(int amt, char c) { 29 | StringBuilder t = new StringBuilder(); 30 | for (int i = 0; i < amt; i++) { 31 | t.append("" + c); 32 | } 33 | return t.toString(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/paulscode/sound/IStreamListener.java: -------------------------------------------------------------------------------- 1 | package paulscode.sound; 2 | 3 | public interface IStreamListener 4 | { 5 | /** 6 | * Notifies implementation that an End Of Stream was reached. 7 | * @param sourcename String identifier of the source which reached the EOS. 8 | * @param queueSize Number of items left the the stream's play queue, or zero if none. 9 | */ 10 | public void endOfStream( String sourcename, int queueSize ); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/test/RunnerTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import engine.ClientLocalRunner; 4 | import engine.io.Load; 5 | 6 | public class RunnerTest extends ClientLocalRunner { 7 | 8 | @Override 9 | public void loadScene(String[] args) { 10 | Load.load("Projects/Fruit/Fruit.json"); 11 | } 12 | 13 | public static void main(String[] args) { 14 | new RunnerTest(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/arrow.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/arrow.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/arrow.png -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/hresize.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/hresize.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/hresize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/hresize.png -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/ibeam.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/ibeam.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/ibeam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/ibeam.png -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/vresize.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/vresize.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/cursors/vresize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/cursors/vresize.png -------------------------------------------------------------------------------- /src/main/resources/assets/models/cube.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.78 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Plane 4 | v -1.000000 0.000000 1.000000 5 | v 1.000000 0.000000 1.000000 6 | v -1.000000 0.000000 -1.000000 7 | v 1.000000 0.000000 -1.000000 8 | vt 1.0000 0.0000 9 | vt 0.0000 1.0000 10 | vt 0.0000 0.0000 11 | vt 1.0000 1.0000 12 | vn 0.0000 1.0000 0.0000 13 | s off 14 | f 2/1/1 3/2/1 1/3/1 15 | f 2/1/1 4/4/1 3/2/1 16 | -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/AreaLight.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, -0.8, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/BRDFIntegrationMap.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, -0.8, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/DirectionalLight.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, -0.8, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/IrradianceCapture.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_Position; 14 | 15 | uniform mat4 projectionMatrix; 16 | uniform mat4 viewMatrix; 17 | 18 | void main() { 19 | vec4 worldPosition = vec4(position, 1.0); 20 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 21 | gl_Position = projectionMatrix * positionRelativeToCam; 22 | pass_Position = position; 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/Outline.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | #include struct Material 12 | 13 | in vec3 pass_position; 14 | 15 | out vec4 out_Color; 16 | 17 | uniform vec3 color; 18 | 19 | #include variable MASK 20 | 21 | void main() { 22 | out_Color = vec4(color, 1.0); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/Outline.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_position; 14 | 15 | uniform mat4 transformationMatrix; 16 | uniform mat4 projectionMatrix; 17 | uniform mat4 viewMatrix; 18 | 19 | void main() { 20 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 21 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 22 | gl_Position = projectionMatrix * positionRelativeToCam; 23 | 24 | pass_position = worldPosition.xyz; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/Particle.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords0; 12 | in vec2 textureCoords1; 13 | in float blend; 14 | 15 | out vec4 out_Color; 16 | 17 | uniform sampler2D particleTexture; 18 | 19 | void main() { 20 | vec4 color = mix(texture(particleTexture, textureCoords0), 21 | texture(particleTexture, textureCoords1), blend); 22 | if (color.a == 0) 23 | discard; 24 | out_Color = color; 25 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/Particle.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | layout(location = 1) in mat4 modelViewMatrix; 13 | layout(location = 5) in vec4 texOffsets; 14 | layout(location = 6) in float blendFactor; 15 | 16 | out vec2 textureCoords0; 17 | out vec2 textureCoords1; 18 | out float blend; 19 | 20 | uniform mat4 projectionMatrix; 21 | uniform float numberOfRows; 22 | 23 | void main() { 24 | vec2 textureCoords = position + vec2(0.5, 0.5); 25 | textureCoords.y = 1.0 - textureCoords.y; 26 | textureCoords /= numberOfRows; 27 | textureCoords0 = textureCoords + texOffsets.xy; 28 | textureCoords1 = textureCoords + texOffsets.zw; 29 | blend = blendFactor; 30 | 31 | vec4 worldPosition = modelViewMatrix * vec4(position, 0.0, 1.0); 32 | gl_Position = projectionMatrix * worldPosition; 33 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/PointLight.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | uniform mat4 transformationMatrix; 14 | uniform mat4 projectionMatrix; 15 | uniform mat4 viewMatrix; 16 | 17 | void main() { 18 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 19 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 20 | gl_Position = projectionMatrix * positionRelativeToCam; 21 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/PreFilteredEnvironment.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_Position; 14 | 15 | uniform mat4 projectionMatrix; 16 | uniform mat4 viewMatrix; 17 | 18 | void main() { 19 | vec4 worldPosition = vec4(position, 1.0); 20 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 21 | gl_Position = projectionMatrix * positionRelativeToCam; 22 | pass_Position = position; 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/SphereToCube.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec3 pass_textureCoords; 12 | 13 | out vec3 out_Color; 14 | 15 | uniform sampler2D environmentMap; 16 | 17 | const vec2 invAtan = vec2(0.1591, 0.3183); 18 | 19 | vec2 SampleSphericalMap(vec3 v) { 20 | vec2 uv = vec2(atan(v.z, v.x), asin(v.y)); 21 | uv *= invAtan; 22 | uv += 0.5; 23 | return uv; 24 | } 25 | 26 | void main() { 27 | vec2 uv = SampleSphericalMap(normalize(pass_textureCoords)); 28 | out_Color = texture(environmentMap, uv).rgb; 29 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/SphereToCube.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_textureCoords; 14 | 15 | uniform mat4 projectionMatrix; 16 | uniform mat4 viewMatrix; 17 | 18 | void main() { 19 | vec4 worldPosition = vec4(position, 1.0); 20 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 21 | gl_Position = projectionMatrix * positionRelativeToCam; 22 | pass_textureCoords = position; 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/SpotLight.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_position; 14 | 15 | uniform mat4 transformationMatrix; 16 | uniform mat4 projectionMatrix; 17 | uniform mat4 viewMatrix; 18 | 19 | void main() { 20 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 21 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 22 | gl_Position = projectionMatrix * positionRelativeToCam; 23 | pass_position = worldPosition.xyz; 24 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/Voxelize.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | layout(location = 1) in vec3 normal; 13 | layout(location = 2) in vec3 tangent; 14 | layout(location = 3) in vec2 textureCoords; 15 | layout(location = 4) in vec4 inColor; 16 | 17 | out vec2 pass_textureCoords; 18 | out mat3 TBN; 19 | 20 | uniform mat4 transformationMatrix; 21 | 22 | void main() { 23 | gl_Position = transformationMatrix * vec4(position, 1.0); 24 | pass_textureCoords = textureCoords; 25 | vec3 T = normalize(vec3(transformationMatrix * vec4(tangent, 0.0))); 26 | vec3 N = normalize(vec3(transformationMatrix * vec4(normal, 0.0))); 27 | T = normalize(T - dot(T, N) * N); 28 | vec3 B = cross(N, T); 29 | TBN = mat3(T, B, N); 30 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/Water.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec3 passPositionOut; 12 | in vec4 clipSpaceOut; 13 | in vec2 textureCoordsOut; 14 | in vec3 normal; 15 | 16 | out vec4[5] out_Color; 17 | 18 | uniform vec3 cameraPosition; 19 | uniform sampler2D dudv; 20 | uniform sampler2D foamMask; 21 | uniform float time; 22 | 23 | void main() { 24 | out_Color[0] = vec4(0.0313725490196078, 0.0549019607843137, 0.1568627450980392, 0.0); 25 | out_Color[1] = vec4(passPositionOut.xyz, 0.0); 26 | out_Color[2] = vec4(normal.xyz, 0.0); 27 | out_Color[3] = vec4(0.0, 0, 0.0, 0.0); 28 | out_Color[4] = vec4(0.0); 29 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/Bloom.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D base; 16 | uniform sampler2D bloom; 17 | 18 | void main() { 19 | vec3 baseColor = texture(base, textureCoords).rgb; 20 | baseColor += texture(bloom, textureCoords).rgb; 21 | out_Color.rgb = baseColor; 22 | out_Color.a = 0.0; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/BloomMask.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D image; 16 | 17 | void main() { 18 | vec3 color = texture(image, textureCoords).rgb; 19 | out_Color.rgb = max(color * 0.1, 0.0); 20 | out_Color.a = 0.0; 21 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/ColorCorrection.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D image; 16 | uniform float exposure; 17 | uniform float gamma; 18 | 19 | #include function toneMap 20 | 21 | void main() { 22 | vec3 color = texture(image, textureCoords).rgb; 23 | vec3 final = vec3(1.0) - exp(-color * exposure); 24 | 25 | // Apply tone-mapping 26 | final = toneMap(final); 27 | 28 | // Apply Gamma 29 | vec3 whiteScale = 1.0 / toneMap(vec3(W)); 30 | final = pow(final * whiteScale, vec3(1.0 / gamma)); 31 | 32 | // Write 33 | out_Color.rgb = final; 34 | out_Color.a = 0.0; 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/Final.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D image; 16 | 17 | void main() { 18 | out_Color.rgb = texture(image, textureCoords).rgb; 19 | out_Color.a = 1.0; 20 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/Final.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, 0.5, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/GaussianBlur.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 blurTexCoords[17]; 14 | 15 | uniform vec2 resolution; 16 | 17 | uniform int vertical; 18 | 19 | void main() { 20 | gl_Position = vec4(position, -0.8, 1.0); 21 | vec2 textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 22 | 23 | vec2 pixelSize = 1.0 / resolution; 24 | if (vertical == 1) 25 | for (int i = -9; i <= 9; i++) 26 | blurTexCoords[i + 9] = textureCoords + vec2(0.0, pixelSize.y * i); 27 | else 28 | for (int i = -9; i <= 9; i++) 29 | blurTexCoords[i + 9] = textureCoords + vec2(pixelSize.x * i, 0.0); 30 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/LensFlaresMod.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D lensFlare; 16 | uniform sampler2D lensDirt; 17 | uniform sampler2D lensStar; 18 | uniform sampler2D image; 19 | 20 | uniform int useLensFlares; 21 | 22 | const float mult = 2.0; 23 | 24 | void main() { 25 | vec3 color = texture(image, textureCoords).rgb; 26 | if (useLensFlares == 1) { 27 | vec3 lensMod = texture(lensDirt, textureCoords).rgb; 28 | lensMod += texture(lensStar, textureCoords).rgb; 29 | vec3 lensFlare = texture(lensFlare, textureCoords).rgb * (lensMod * mult); 30 | color += lensFlare; 31 | } 32 | out_Color.rgb = color; 33 | out_Color.a = 0.0; 34 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/MergeReflection.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D gMask; 16 | uniform sampler2D baseTex; 17 | uniform sampler2D ssrTex; 18 | uniform sampler2D reflectionTex; 19 | 20 | uniform bool useReflections; 21 | 22 | #include variable MASK 23 | 24 | void main(void) { 25 | vec3 image = texture(baseTex, textureCoords).rgb; 26 | vec4 mask = texture(gMask, textureCoords); 27 | if (MASK_COMPARE(mask.a, PBR_OBJECT)) { 28 | vec4 reflectionData = texture(reflectionTex, textureCoords); 29 | vec3 specular = reflectionData.rgb * reflectionData.a; 30 | if (useReflections) { 31 | vec4 ssrData = texture(ssrTex, textureCoords); 32 | specular = mix(specular, ssrData.rgb, ssrData.a); 33 | image += specular; 34 | } else { 35 | image += specular; 36 | } 37 | } 38 | out_Color.rgb = image; 39 | out_Color.a = 0.0; 40 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/MotionBlur.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D image; 16 | 17 | uniform sampler2D gMotion; 18 | 19 | uniform int useMotionBlur; 20 | 21 | void main() { 22 | vec3 textureColor = texture(image, textureCoords).rgb; 23 | if (useMotionBlur == 1) { 24 | vec2 vel = texture(gMotion, textureCoords).rg * 0.5; 25 | vec2 motionCoords = textureCoords; 26 | vec3 sum = textureColor; 27 | 28 | vel *= 0.1; // Controls the amount of blur 29 | int samples = 1; 30 | vec2 coord = textureCoords - vel * 6.0; 31 | for (int i = 0; i < 12; ++i, coord += vel) { 32 | sum += texture(image, coord).rgb; 33 | samples++; 34 | } 35 | sum = sum / samples; 36 | textureColor = sum; 37 | } 38 | out_Color.rgb = textureColor; 39 | out_Color.a = 0.0; 40 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/TAA.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | out vec2 pixelSize; 15 | 16 | uniform vec2 resolution; 17 | 18 | void main() { 19 | gl_Position = vec4(position, -0.8, 1.0); 20 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 21 | pixelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y); 22 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred/VolumetricLight.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, -0.8, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/deferred_compute/ColorCorrection.comp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(local_size_x = 16, local_size_y = 16) in; 12 | layout(rgba16f, binding = 0) restrict writeonly uniform image2D out_color; 13 | 14 | uniform sampler2D image; 15 | uniform float exposure; 16 | uniform float gamma; 17 | 18 | #include function toneMap 19 | 20 | void main() { 21 | ivec2 pixelCoords = ivec2(gl_GlobalInvocationID.xy); 22 | 23 | vec3 color = texelFetch(image, pixelCoords, 0).rgb; 24 | vec3 final = vec3(1.0) - exp(-color * exposure); 25 | 26 | // Apply tone-mapping 27 | final = toneMap(final); 28 | 29 | // Apply Gamma 30 | vec3 whiteScale = 1.0 / toneMap(vec3(W)); 31 | final = pow(final * whiteScale, vec3(1.0 / gamma)); 32 | 33 | // Write 34 | imageStore(out_color, pixelCoords, vec4(final, 0.0)); 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/includes/color.isl: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | #function toneMap 12 | const float A = 0.15; 13 | const float B = 0.50; 14 | const float C = 0.10; 15 | const float D = 0.20; 16 | const float E = 0.02; 17 | const float F = 0.30; 18 | const float W = 1.0; 19 | 20 | vec3 toneMap(vec3 x) { 21 | return ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F; 22 | } 23 | #end 24 | 25 | #function luma 26 | float luma(vec3 color) { 27 | vec3 cc = vec3(0.299, 0.587, 0.114); 28 | return dot(color, cc); 29 | } 30 | #end -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/includes/global.isl: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | #variable GLOBAL 12 | #define MAX_REFLECTION_LOD 4.0 13 | #define MAX_DISTANCE_VOLUME 1000 14 | #define MAX_DISTANCE_REFLECTION 1000 15 | #end 16 | 17 | #variable GLES 18 | precision highp float; 19 | #end -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/includes/materials.isl: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | #struct Material 12 | struct Material { 13 | vec3 diffuse; 14 | vec3 emissive; 15 | float roughness; 16 | float metallic; 17 | sampler2D diffuseTex; 18 | sampler2D normalTex; 19 | sampler2D roughnessTex; 20 | sampler2D metallicTex; 21 | }; 22 | #end -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/pipeline/DefaultPipeline.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, -0.8, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/postprocess/DoF.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec3 out_Color; 14 | 15 | uniform sampler2D image; 16 | uniform sampler2D depth; 17 | 18 | uniform int useDOF; 19 | 20 | void main(void) { 21 | vec3 color = texture(image, textureCoords).rgb; 22 | if (useDOF == 1) { 23 | vec3 sum = color; 24 | float bias = 25 | min(abs(texture(depth, textureCoords).r - texture(depth, vec2(0.5)).r) * .01, .005); 26 | for (int i = -4; i < 4; i++) { 27 | for (int j = -4; j < 4; j++) { 28 | sum += texture(image, textureCoords + vec2(j, i) * bias).rgb; 29 | } 30 | } 31 | sum /= 65.0; 32 | color = sum; 33 | } 34 | out_Color = color; 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/postprocess/FXAA.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | out vec4 posPos; 15 | 16 | uniform vec2 resolution; 17 | 18 | uniform int useFXAA; 19 | 20 | #define FXAA_SUBPIX_SHIFT (1.0 / 4.0) 21 | 22 | void main() { 23 | gl_Position = vec4(position, -0.8, 1.0); 24 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 25 | if (useFXAA == 1) { 26 | vec2 rcpFrame = vec2(1.0 / resolution.x, 1.0 / resolution.y); 27 | posPos.xy = textureCoords; 28 | posPos.zw = textureCoords - (rcpFrame * (0.5 + FXAA_SUBPIX_SHIFT)); 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/postprocess/Final.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D image; 16 | 17 | void main() { 18 | out_Color = texture(image, textureCoords); 19 | out_Color.a = 1.0; 20 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/postprocess/Final.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec2 position; 12 | 13 | out vec2 textureCoords; 14 | 15 | void main() { 16 | gl_Position = vec4(position, 0.5, 1.0); 17 | textureCoords = vec2((position.x + 1.0) / 2.0, (position.y + 1.0) / 2.0); 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/postprocess/FinalColorCorrection.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform sampler2D image; 16 | uniform float saturation; 17 | 18 | #include variable GLOBAL 19 | 20 | #include function luma 21 | 22 | float rand(vec2 co){ 23 | return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); 24 | } 25 | 26 | float dither(){ 27 | return (-0.5 + rand(textureCoords)) * (1.0 / 100.0); //Noise dithering 28 | } 29 | 30 | void main() { 31 | vec3 color = texture(image, textureCoords).rgb; 32 | vec3 final = color; 33 | 34 | // Apply Dithering 35 | float lum = luma(final); 36 | final += dither()/2.0; 37 | 38 | // Apply saturation 39 | final = mix(vec3(lum), final, saturation); 40 | 41 | // Write 42 | out_Color.rgb = final; 43 | out_Color.a = 1; 44 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/AnimInstancePointShadow.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | layout(location = 1) in vec3 normal; 13 | layout(location = 2) in vec3 tangent; 14 | layout(location = 3) in vec2 textureCoords; 15 | layout(location = 4) in vec4 inColor; 16 | layout(location = 5) in vec4 boneIndices; 17 | layout(location = 6) in vec4 boneWeights; 18 | 19 | #define MAX_BONES 128 20 | 21 | uniform mat4 transformationMatrix; 22 | 23 | uniform mat4 boneMat[MAX_BONES]; 24 | 25 | void main() { 26 | mat4 boneTransform = boneMat[int(boneIndices[0])] * boneWeights[0]; 27 | boneTransform += boneMat[int(boneIndices[1])] * boneWeights[1]; 28 | boneTransform += boneMat[int(boneIndices[2])] * boneWeights[2]; 29 | boneTransform += boneMat[int(boneIndices[3])] * boneWeights[3]; 30 | 31 | vec4 BToP = boneTransform * vec4(position, 1.0); 32 | 33 | vec4 worldPosition = transformationMatrix * BToP; 34 | gl_Position = worldPosition; 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/InstanceCube.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | layout(location = 1) in vec3 normal; 13 | layout(location = 2) in vec3 tangent; 14 | layout(location = 3) in vec2 textureCoords; 15 | layout(location = 4) in vec4 inColor; 16 | 17 | out vec2 passTextureCoords; 18 | out vec4 passPosition; 19 | out mat3 passTBN; 20 | 21 | uniform mat4 transformationMatrix; 22 | 23 | void main() { 24 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 25 | gl_Position = worldPosition; 26 | passTextureCoords = textureCoords; 27 | 28 | vec3 T = normalize(vec3(transformationMatrix * vec4(tangent, 0.0))); 29 | vec3 N = normalize(vec3(transformationMatrix * vec4(normal, 0.0))); 30 | T = normalize(T - dot(T, N) * N); 31 | vec3 B = cross(N, T); 32 | passTBN = mat3(T, B, N); 33 | 34 | passPosition = worldPosition; 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/InstanceDirectionalShadow.gs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(triangles) in; 12 | #if __VERSION__ >= 400 13 | layout(invocations = 4) in; 14 | #endif 15 | layout(triangle_strip, max_vertices = 12) out; 16 | 17 | uniform mat4 projectionMatrix[4]; 18 | 19 | void compute(int i) { 20 | gl_Layer = i; 21 | gl_Position = projectionMatrix[i] * gl_in[0].gl_Position; 22 | EmitVertex(); 23 | 24 | gl_Position = projectionMatrix[i] * gl_in[1].gl_Position; 25 | EmitVertex(); 26 | 27 | gl_Position = projectionMatrix[i] * gl_in[2].gl_Position; 28 | EmitVertex(); 29 | 30 | EndPrimitive(); 31 | } 32 | 33 | void main() { 34 | #if __VERSION__ >= 400 35 | compute(gl_InvocationID); 36 | #else 37 | for (int i = 0; i < 6; i++) 38 | compute(i); 39 | #endif 40 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/InstanceDirectionalShadow.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | uniform mat4 transformationMatrix; 14 | uniform mat4 viewMatrix; 15 | 16 | void main() { 17 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 18 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 19 | gl_Position = positionRelativeToCam; 20 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/InstancePointShadow.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | uniform mat4 transformationMatrix; 14 | 15 | void main() { 16 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 17 | gl_Position = worldPosition; 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/InstanceShadow.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec2 pass_textureCoords; 12 | 13 | uniform float transparency; 14 | 15 | void main() { 16 | if (transparency > 0.0) 17 | discard; 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/renderers/InstanceSpotShadow.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | uniform mat4 transformationMatrix; 14 | uniform mat4 viewMatrix; 15 | 16 | uniform mat4 projectionMatrix; 17 | 18 | void main() { 19 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 20 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 21 | gl_Position = projectionMatrix * positionRelativeToCam;;; 22 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/Ambient.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec3 pass_position; 12 | in vec4 clipSpace; 13 | in vec4 clipSpacePrev; 14 | 15 | out vec4[5] out_Color; 16 | 17 | uniform vec3 ambient; 18 | 19 | #include variable MASK 20 | 21 | void main() { 22 | 23 | vec3 ndcPos = (clipSpace / clipSpace.w).xyz; 24 | vec3 ndcPosPrev = (clipSpacePrev / clipSpacePrev.w).xyz; 25 | 26 | out_Color[0] = vec4(ambient, 0.0); 27 | out_Color[1] = vec4((ndcPosPrev - ndcPos).xy, 0.0, 0.0); 28 | out_Color[2] = vec4(0.0); 29 | out_Color[3] = vec4(0.0); 30 | out_Color[4] = vec4(0.0, 0.0, 0.0, PBR_BACKGROUND); 31 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/Ambient.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_position; 14 | out vec4 clipSpace; 15 | out vec4 clipSpacePrev; 16 | 17 | uniform mat4 projectionMatrix; 18 | uniform mat4 viewMatrix; 19 | uniform mat4 transformationMatrix; 20 | uniform mat4 projectionMatrixPrev; 21 | uniform mat4 viewMatrixPrev; 22 | 23 | void main() { 24 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 25 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 26 | clipSpace = projectionMatrix * positionRelativeToCam; 27 | gl_Position = clipSpace; 28 | pass_position = worldPosition.xyz; 29 | 30 | worldPosition = transformationMatrix * vec4(position, 1.0); 31 | positionRelativeToCam = viewMatrixPrev * worldPosition; 32 | clipSpacePrev = projectionMatrixPrev * positionRelativeToCam; 33 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/AmbientCube.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | out vec4 out_Color; 12 | 13 | uniform vec3 ambient; 14 | 15 | void main() { 16 | out_Color = vec4(ambient, 0.0); 17 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/AmbientCube.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | uniform mat4 transformationMatrix; 14 | 15 | void main() { 16 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 17 | gl_Position = worldPosition; 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/DynamicCube.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | layout(location = 1) in vec2 textureCoords; 13 | layout(location = 2) in vec3 normal; 14 | 15 | out vec2 passTextureCoords; 16 | out vec3 passNormal; 17 | 18 | uniform mat4 transformationMatrix; 19 | 20 | void main() { 21 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 22 | gl_Position = worldPosition; 23 | passTextureCoords = textureCoords; 24 | passNormal = normal; 25 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/Static.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec3 pass_textureCoords; 12 | in vec3 pass_position; 13 | in vec4 clipSpace; 14 | in vec4 clipSpacePrev; 15 | 16 | out vec4[5] out_Color; 17 | 18 | uniform samplerCube environmentMap; 19 | uniform float power; 20 | uniform float brightness; 21 | uniform vec3 ambient; 22 | 23 | #include variable MASK 24 | 25 | void main() { 26 | vec3 color = texture(environmentMap, pass_textureCoords).rgb; 27 | 28 | color = max(color, 0.0); 29 | color = pow(color, vec3(power)); 30 | color *= brightness; 31 | 32 | vec3 ndcPos = (clipSpace / clipSpace.w).xyz; 33 | vec3 ndcPosPrev = (clipSpacePrev / clipSpacePrev.w).xyz; 34 | 35 | out_Color[0] = vec4(color * ambient, 0.0); 36 | out_Color[1] = vec4((ndcPosPrev - ndcPos).xy, 0.0, 0.0); 37 | out_Color[2] = vec4(0.0); 38 | out_Color[3] = vec4(0.0); 39 | out_Color[4] = vec4(0.0, 0.0, 0.0, PBR_BACKGROUND); 40 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/Static.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 pass_textureCoords; 14 | out vec3 pass_position; 15 | out vec4 clipSpace; 16 | out vec4 clipSpacePrev; 17 | 18 | uniform mat4 projectionMatrix; 19 | uniform mat4 viewMatrix; 20 | uniform mat4 transformationMatrix; 21 | uniform mat4 projectionMatrixPrev; 22 | uniform mat4 viewMatrixPrev; 23 | 24 | void main() { 25 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 26 | vec4 positionRelativeToCam = viewMatrix * worldPosition; 27 | clipSpace = projectionMatrix * positionRelativeToCam; 28 | gl_Position = clipSpace; 29 | pass_textureCoords = position; 30 | pass_position = worldPosition.xyz; 31 | 32 | worldPosition = transformationMatrix * vec4(position, 1.0); 33 | positionRelativeToCam = viewMatrixPrev * worldPosition; 34 | clipSpacePrev = projectionMatrixPrev * positionRelativeToCam; 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/StaticCube.fs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | in vec3 pass_textureCoords; 12 | 13 | out vec4 out_Color; 14 | 15 | uniform samplerCube environmentMap; 16 | uniform float power; 17 | uniform float brightness; 18 | uniform vec3 ambient; 19 | 20 | void main() { 21 | vec3 color = texture(environmentMap, pass_textureCoords).rgb; 22 | 23 | color = max(color, 0.0); 24 | color = pow(color, vec3(power)); 25 | color *= brightness; 26 | 27 | out_Color = vec4(color * ambient, 0.0); 28 | } -------------------------------------------------------------------------------- /src/main/resources/assets/shaders/sky/StaticCube.vs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015-2020 Anarchy Engine Open Source Contributors (see CONTRIBUTORS.md) 4 | 5 | This Source Code Form is subject to the terms of the Mozilla Public 6 | License, v. 2.0. If a copy of the MPL was not distributed with this 7 | file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | 9 | */ 10 | 11 | layout(location = 0) in vec3 position; 12 | 13 | out vec3 passTextureCoords; 14 | 15 | uniform mat4 transformationMatrix; 16 | 17 | void main() { 18 | vec4 worldPosition = transformationMatrix * vec4(position, 1.0); 19 | gl_Position = worldPosition; 20 | passTextureCoords = position; 21 | } -------------------------------------------------------------------------------- /src/main/resources/assets/textures/amp.ltc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/textures/amp.ltc -------------------------------------------------------------------------------- /src/main/resources/assets/textures/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/textures/checker.png -------------------------------------------------------------------------------- /src/main/resources/assets/textures/lens/lens_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/textures/lens/lens_color.png -------------------------------------------------------------------------------- /src/main/resources/assets/textures/lens/lens_dirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/textures/lens/lens_dirt.png -------------------------------------------------------------------------------- /src/main/resources/assets/textures/lens/lens_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/textures/lens/lens_star.png -------------------------------------------------------------------------------- /src/main/resources/assets/textures/mat.ltc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/assets/textures/mat.ltc -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/AnimationData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/AnimationData.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/AssetFolder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/AssetFolder.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/AssetFolderMaterial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/AssetFolderMaterial.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/AssetFolderMesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/AssetFolderMesh.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/AssetFolderPrefab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/AssetFolderPrefab.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/AssetFolderTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/AssetFolderTexture.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Box.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/CSS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/CSS.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Camera.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Console.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Copy.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Cross.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Cut.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/DirectionalLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/DirectionalLight.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Event.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Explorer.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Film.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Film.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/FilmTimeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/FilmTimeline.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Folder.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/GameObject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/GameObject.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Grid.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/GridSnap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/GridSnap.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Gui.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ImageButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ImageButton.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Keyboard.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Light.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/LightSpot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/LightSpot.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Material.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Mesh.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Model.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ModelAlt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ModelAlt.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Network.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/NetworkPlayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/NetworkPlayer.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/NetworkServer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/NetworkServer.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/New.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/New.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Pane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Pane.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Paste.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Play.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/PlayServer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/PlayServer.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Player.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/PlayerGui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/PlayerGui.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/PlayerScripts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/PlayerScripts.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/PlayerScriptsGUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/PlayerScriptsGUI.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Players.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Players.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Properties.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Redo.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/RemoteEvent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/RemoteEvent.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Save.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/SaveAs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/SaveAs.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Scenes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Scenes.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Script.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ScriptGlobal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ScriptGlobal.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ScriptJava.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ScriptJava.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ScriptLocal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ScriptLocal.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ScriptService.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ScriptService.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/ServerScripts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/ServerScripts.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Skybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Skybox.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Sound.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/StarterPlayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/StarterPlayer.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Storage.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/TextButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/TextButton.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/TextField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/TextField.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/TextLabel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/TextLabel.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/TextLabelAlt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/TextLabelAlt.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Texture.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Undo.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Value.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Value2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Value2.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/Weld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/Weld.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/World.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/World.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/computer.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/cup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/cup.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/hbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/hbox.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/icon-sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/icon-sky.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/plus-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/plus-small.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/vbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/vbox.png -------------------------------------------------------------------------------- /src/main/resources/ide/layout/windows/icons/wat.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orange451/AnarchyEngine/26b6108fb0d5980a374bbdc75582d37f44a4a1a4/src/main/resources/ide/layout/windows/icons/wat.gif --------------------------------------------------------------------------------