├── .atom-build.json ├── .gitignore ├── .gitmodules ├── .vimrc ├── .vscode ├── settings.json └── tasks.json ├── LICENSE ├── README.md ├── build ├── clean ├── locales │ ├── am.pak │ ├── ar.pak │ ├── bg.pak │ ├── bn.pak │ ├── ca.pak │ ├── cs.pak │ ├── da.pak │ ├── de.pak │ ├── el.pak │ ├── en-GB.pak │ ├── en-US.pak │ ├── es-419.pak │ ├── es.pak │ ├── et.pak │ ├── fa.pak │ ├── fi.pak │ ├── fil.pak │ ├── fr.pak │ ├── gu.pak │ ├── he.pak │ ├── hi.pak │ ├── hr.pak │ ├── hu.pak │ ├── id.pak │ ├── it.pak │ ├── ja.pak │ ├── kn.pak │ ├── ko.pak │ ├── lt.pak │ ├── lv.pak │ ├── ml.pak │ ├── mr.pak │ ├── ms.pak │ ├── nb.pak │ ├── nl.pak │ ├── pl.pak │ ├── pt-BR.pak │ ├── pt-PT.pak │ ├── ro.pak │ ├── ru.pak │ ├── sk.pak │ ├── sl.pak │ ├── sr.pak │ ├── sv.pak │ ├── sw.pak │ ├── ta.pak │ ├── te.pak │ ├── th.pak │ ├── tr.pak │ ├── uk.pak │ ├── vi.pak │ ├── zh-CN.pak │ └── zh-TW.pak ├── premake4.lua └── test.hxml ├── deps ├── linux │ ├── include │ │ └── cef │ │ │ └── include │ │ │ ├── capi │ │ │ ├── cef_app_capi.h │ │ │ ├── cef_auth_callback_capi.h │ │ │ ├── cef_base_capi.h │ │ │ ├── cef_browser_capi.h │ │ │ ├── cef_browser_process_handler_capi.h │ │ │ ├── cef_callback_capi.h │ │ │ ├── cef_client_capi.h │ │ │ ├── cef_command_line_capi.h │ │ │ ├── cef_context_menu_handler_capi.h │ │ │ ├── cef_cookie_capi.h │ │ │ ├── cef_dialog_handler_capi.h │ │ │ ├── cef_display_handler_capi.h │ │ │ ├── cef_dom_capi.h │ │ │ ├── cef_download_handler_capi.h │ │ │ ├── cef_download_item_capi.h │ │ │ ├── cef_drag_data_capi.h │ │ │ ├── cef_drag_handler_capi.h │ │ │ ├── cef_focus_handler_capi.h │ │ │ ├── cef_frame_capi.h │ │ │ ├── cef_geolocation_capi.h │ │ │ ├── cef_geolocation_handler_capi.h │ │ │ ├── cef_jsdialog_handler_capi.h │ │ │ ├── cef_keyboard_handler_capi.h │ │ │ ├── cef_life_span_handler_capi.h │ │ │ ├── cef_load_handler_capi.h │ │ │ ├── cef_menu_model_capi.h │ │ │ ├── cef_origin_whitelist_capi.h │ │ │ ├── cef_path_util_capi.h │ │ │ ├── cef_process_message_capi.h │ │ │ ├── cef_process_util_capi.h │ │ │ ├── cef_render_handler_capi.h │ │ │ ├── cef_render_process_handler_capi.h │ │ │ ├── cef_request_capi.h │ │ │ ├── cef_request_context_capi.h │ │ │ ├── cef_request_context_handler_capi.h │ │ │ ├── cef_request_handler_capi.h │ │ │ ├── cef_resource_bundle_handler_capi.h │ │ │ ├── cef_resource_handler_capi.h │ │ │ ├── cef_response_capi.h │ │ │ ├── cef_scheme_capi.h │ │ │ ├── cef_stream_capi.h │ │ │ ├── cef_string_visitor_capi.h │ │ │ ├── cef_task_capi.h │ │ │ ├── cef_trace_capi.h │ │ │ ├── cef_url_capi.h │ │ │ ├── cef_urlrequest_capi.h │ │ │ ├── cef_v8_capi.h │ │ │ ├── cef_values_capi.h │ │ │ ├── cef_web_plugin_capi.h │ │ │ ├── cef_xml_reader_capi.h │ │ │ └── cef_zip_reader_capi.h │ │ │ ├── cef_app.h │ │ │ ├── cef_auth_callback.h │ │ │ ├── cef_base.h │ │ │ ├── cef_browser.h │ │ │ ├── cef_browser_process_handler.h │ │ │ ├── cef_callback.h │ │ │ ├── cef_client.h │ │ │ ├── cef_command_line.h │ │ │ ├── cef_context_menu_handler.h │ │ │ ├── cef_cookie.h │ │ │ ├── cef_dialog_handler.h │ │ │ ├── cef_display_handler.h │ │ │ ├── cef_dom.h │ │ │ ├── cef_download_handler.h │ │ │ ├── cef_download_item.h │ │ │ ├── cef_drag_data.h │ │ │ ├── cef_drag_handler.h │ │ │ ├── cef_focus_handler.h │ │ │ ├── cef_frame.h │ │ │ ├── cef_geolocation.h │ │ │ ├── cef_geolocation_handler.h │ │ │ ├── cef_jsdialog_handler.h │ │ │ ├── cef_keyboard_handler.h │ │ │ ├── cef_life_span_handler.h │ │ │ ├── cef_load_handler.h │ │ │ ├── cef_menu_model.h │ │ │ ├── cef_origin_whitelist.h │ │ │ ├── cef_pack_resources.h │ │ │ ├── cef_pack_strings.h │ │ │ ├── cef_path_util.h │ │ │ ├── cef_process_message.h │ │ │ ├── cef_process_util.h │ │ │ ├── cef_render_handler.h │ │ │ ├── cef_render_process_handler.h │ │ │ ├── cef_request.h │ │ │ ├── cef_request_context.h │ │ │ ├── cef_request_context_handler.h │ │ │ ├── cef_request_handler.h │ │ │ ├── cef_resource_bundle_handler.h │ │ │ ├── cef_resource_handler.h │ │ │ ├── cef_response.h │ │ │ ├── cef_runnable.h │ │ │ ├── cef_scheme.h │ │ │ ├── cef_stream.h │ │ │ ├── cef_string_visitor.h │ │ │ ├── cef_task.h │ │ │ ├── cef_trace.h │ │ │ ├── cef_trace_event.h │ │ │ ├── cef_url.h │ │ │ ├── cef_urlrequest.h │ │ │ ├── cef_v8.h │ │ │ ├── cef_values.h │ │ │ ├── cef_version.h │ │ │ ├── cef_web_plugin.h │ │ │ ├── cef_xml_reader.h │ │ │ ├── cef_zip_reader.h │ │ │ ├── internal │ │ │ ├── cef_build.h │ │ │ ├── cef_export.h │ │ │ ├── cef_linux.h │ │ │ ├── cef_ptr.h │ │ │ ├── cef_string.h │ │ │ ├── cef_string_list.h │ │ │ ├── cef_string_map.h │ │ │ ├── cef_string_multimap.h │ │ │ ├── cef_string_types.h │ │ │ ├── cef_string_wrappers.h │ │ │ ├── cef_time.h │ │ │ ├── cef_tuple.h │ │ │ ├── cef_types.h │ │ │ ├── cef_types_linux.h │ │ │ └── cef_types_wrappers.h │ │ │ └── wrapper │ │ │ ├── cef_byte_read_handler.h │ │ │ ├── cef_message_router.h │ │ │ ├── cef_stream_resource_handler.h │ │ │ ├── cef_xml_object.h │ │ │ └── cef_zip_archive.h │ └── lib64 │ │ └── get-libs └── windows │ ├── include │ ├── GL │ │ ├── glew.h │ │ ├── glext.h │ │ ├── glxew.h │ │ └── wglew.h │ ├── cef │ │ └── include │ │ │ ├── capi │ │ │ ├── cef_app_capi.h │ │ │ ├── cef_auth_callback_capi.h │ │ │ ├── cef_base_capi.h │ │ │ ├── cef_browser_capi.h │ │ │ ├── cef_browser_process_handler_capi.h │ │ │ ├── cef_callback_capi.h │ │ │ ├── cef_client_capi.h │ │ │ ├── cef_command_line_capi.h │ │ │ ├── cef_context_menu_handler_capi.h │ │ │ ├── cef_cookie_capi.h │ │ │ ├── cef_dialog_handler_capi.h │ │ │ ├── cef_display_handler_capi.h │ │ │ ├── cef_dom_capi.h │ │ │ ├── cef_download_handler_capi.h │ │ │ ├── cef_download_item_capi.h │ │ │ ├── cef_drag_data_capi.h │ │ │ ├── cef_drag_handler_capi.h │ │ │ ├── cef_focus_handler_capi.h │ │ │ ├── cef_frame_capi.h │ │ │ ├── cef_geolocation_capi.h │ │ │ ├── cef_geolocation_handler_capi.h │ │ │ ├── cef_jsdialog_handler_capi.h │ │ │ ├── cef_keyboard_handler_capi.h │ │ │ ├── cef_life_span_handler_capi.h │ │ │ ├── cef_load_handler_capi.h │ │ │ ├── cef_menu_model_capi.h │ │ │ ├── cef_origin_whitelist_capi.h │ │ │ ├── cef_path_util_capi.h │ │ │ ├── cef_process_message_capi.h │ │ │ ├── cef_process_util_capi.h │ │ │ ├── cef_render_handler_capi.h │ │ │ ├── cef_render_process_handler_capi.h │ │ │ ├── cef_request_capi.h │ │ │ ├── cef_request_context_capi.h │ │ │ ├── cef_request_context_handler_capi.h │ │ │ ├── cef_request_handler_capi.h │ │ │ ├── cef_resource_bundle_handler_capi.h │ │ │ ├── cef_resource_handler_capi.h │ │ │ ├── cef_response_capi.h │ │ │ ├── cef_scheme_capi.h │ │ │ ├── cef_stream_capi.h │ │ │ ├── cef_string_visitor_capi.h │ │ │ ├── cef_task_capi.h │ │ │ ├── cef_trace_capi.h │ │ │ ├── cef_url_capi.h │ │ │ ├── cef_urlrequest_capi.h │ │ │ ├── cef_v8_capi.h │ │ │ ├── cef_values_capi.h │ │ │ ├── cef_web_plugin_capi.h │ │ │ ├── cef_xml_reader_capi.h │ │ │ └── cef_zip_reader_capi.h │ │ │ ├── cef_app.h │ │ │ ├── cef_auth_callback.h │ │ │ ├── cef_base.h │ │ │ ├── cef_browser.h │ │ │ ├── cef_browser_process_handler.h │ │ │ ├── cef_callback.h │ │ │ ├── cef_client.h │ │ │ ├── cef_command_line.h │ │ │ ├── cef_context_menu_handler.h │ │ │ ├── cef_cookie.h │ │ │ ├── cef_dialog_handler.h │ │ │ ├── cef_display_handler.h │ │ │ ├── cef_dom.h │ │ │ ├── cef_download_handler.h │ │ │ ├── cef_download_item.h │ │ │ ├── cef_drag_data.h │ │ │ ├── cef_drag_handler.h │ │ │ ├── cef_focus_handler.h │ │ │ ├── cef_frame.h │ │ │ ├── cef_geolocation.h │ │ │ ├── cef_geolocation_handler.h │ │ │ ├── cef_jsdialog_handler.h │ │ │ ├── cef_keyboard_handler.h │ │ │ ├── cef_life_span_handler.h │ │ │ ├── cef_load_handler.h │ │ │ ├── cef_menu_model.h │ │ │ ├── cef_origin_whitelist.h │ │ │ ├── cef_pack_resources.h │ │ │ ├── cef_pack_strings.h │ │ │ ├── cef_path_util.h │ │ │ ├── cef_process_message.h │ │ │ ├── cef_process_util.h │ │ │ ├── cef_render_handler.h │ │ │ ├── cef_render_process_handler.h │ │ │ ├── cef_request.h │ │ │ ├── cef_request_context.h │ │ │ ├── cef_request_context_handler.h │ │ │ ├── cef_request_handler.h │ │ │ ├── cef_resource_bundle_handler.h │ │ │ ├── cef_resource_handler.h │ │ │ ├── cef_response.h │ │ │ ├── cef_runnable.h │ │ │ ├── cef_sandbox_win.h │ │ │ ├── cef_scheme.h │ │ │ ├── cef_stream.h │ │ │ ├── cef_string_visitor.h │ │ │ ├── cef_task.h │ │ │ ├── cef_trace.h │ │ │ ├── cef_trace_event.h │ │ │ ├── cef_url.h │ │ │ ├── cef_urlrequest.h │ │ │ ├── cef_v8.h │ │ │ ├── cef_values.h │ │ │ ├── cef_version.h │ │ │ ├── cef_web_plugin.h │ │ │ ├── cef_xml_reader.h │ │ │ ├── cef_zip_reader.h │ │ │ ├── internal │ │ │ ├── cef_build.h │ │ │ ├── cef_export.h │ │ │ ├── cef_ptr.h │ │ │ ├── cef_string.h │ │ │ ├── cef_string_list.h │ │ │ ├── cef_string_map.h │ │ │ ├── cef_string_multimap.h │ │ │ ├── cef_string_types.h │ │ │ ├── cef_string_wrappers.h │ │ │ ├── cef_time.h │ │ │ ├── cef_tuple.h │ │ │ ├── cef_types.h │ │ │ ├── cef_types_win.h │ │ │ ├── cef_types_wrappers.h │ │ │ └── cef_win.h │ │ │ └── wrapper │ │ │ ├── cef_byte_read_handler.h │ │ │ ├── cef_message_router.h │ │ │ ├── cef_stream_resource_handler.h │ │ │ ├── cef_xml_object.h │ │ │ └── cef_zip_archive.h │ └── dirent.h │ └── lib │ └── get-libs ├── docs ├── Application.html ├── Array.html ├── ArrayAccess.html ├── Bool.html ├── Class.html ├── Dynamic.html ├── Enum.html ├── EnumValue.html ├── Float.html ├── Int.html ├── Iterable.html ├── Iterator.html ├── Map.html ├── Null.html ├── Reflect.html ├── Std.html ├── String.html ├── Type.html ├── Void.html ├── ash │ ├── ClassMap.html │ ├── GenericListIterator.html │ ├── core │ │ ├── ComponentMatchingFamily.html │ │ ├── Engine.html │ │ ├── Entity.html │ │ ├── EntityList.html │ │ ├── IFamily.html │ │ ├── Node.html │ │ ├── NodeList.html │ │ ├── NodePool.html │ │ ├── SortFunction.html │ │ ├── System.html │ │ ├── SystemList.html │ │ └── index.html │ ├── index.html │ ├── signals │ │ ├── ListenerNode.html │ │ ├── ListenerNodePool.html │ │ ├── Signal0.html │ │ ├── Signal1.html │ │ ├── Signal2.html │ │ ├── SignalBase.html │ │ └── index.html │ └── tools │ │ ├── ListIteratingSystem.html │ │ └── index.html ├── bootstrap │ ├── css │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap-responsive.min.css │ │ ├── bootstrap-select.min.css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ └── js │ │ ├── bootstrap-select.min.js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js ├── favicon.ico ├── gengine │ ├── Engine.html │ ├── Entity.html │ ├── Gengine.html │ ├── Node.html │ ├── System.html │ ├── audio │ │ ├── Audio.html │ │ ├── Sound.html │ │ └── index.html │ ├── components │ │ ├── AnimatedModel.html │ │ ├── AnimatedSprite2D.html │ │ ├── AnimationController.html │ │ ├── BiasParameters.html │ │ ├── BillboardSet.html │ │ ├── Camera.html │ │ ├── CascadeParameters.html │ │ ├── CollisionBox2D.html │ │ ├── CollisionChain2D.html │ │ ├── CollisionCircle2D.html │ │ ├── CollisionEdge2D.html │ │ ├── CollisionPolygon2D.html │ │ ├── CollisionShape.html │ │ ├── CollisionShape2D.html │ │ ├── Constraint.html │ │ ├── Constraint2D.html │ │ ├── ConstraintDistance2D.html │ │ ├── ConstraintFriction2D.html │ │ ├── ConstraintGear2D.html │ │ ├── ConstraintMotor2D.html │ │ ├── ConstraintMouse2D.html │ │ ├── ConstraintPrismatic2D.html │ │ ├── ConstraintPulley2D.html │ │ ├── ConstraintRevolute2D.html │ │ ├── ConstraintRope2D.html │ │ ├── ConstraintWeld2D.html │ │ ├── ConstraintWheel2D.html │ │ ├── CustomGeometry.html │ │ ├── DecalSet.html │ │ ├── Drawable.html │ │ ├── Drawable2D.html │ │ ├── Light.html │ │ ├── LogicComponent.html │ │ ├── Octree.html │ │ ├── ParticleEmitter.html │ │ ├── ParticleEmitter2D.html │ │ ├── PhysicsWorld.html │ │ ├── PhysicsWorld2D.html │ │ ├── RaycastVehicle.html │ │ ├── Renderer2D.html │ │ ├── RibbonTrail.html │ │ ├── RigidBody.html │ │ ├── RigidBody2D.html │ │ ├── Skybox.html │ │ ├── SoundListener.html │ │ ├── SoundSource.html │ │ ├── SoundSource3D.html │ │ ├── StaticModel.html │ │ ├── StaticModelGroup.html │ │ ├── StaticSprite2D.html │ │ ├── Terrain.html │ │ ├── TerrainPatch.html │ │ ├── TileMap2D.html │ │ ├── TileMapLayer2D.html │ │ └── index.html │ ├── core │ │ ├── Context.html │ │ └── index.html │ ├── graphics │ │ ├── Animation.html │ │ ├── AnimationSet2D.html │ │ ├── AnimationState.html │ │ ├── BiasParameters.html │ │ ├── CascadeParameters.html │ │ ├── Image.html │ │ ├── Material.html │ │ ├── Model.html │ │ ├── ParticleEffect.html │ │ ├── ParticleEffect2D.html │ │ ├── Renderer.html │ │ ├── Skeleton.html │ │ ├── Sprite2D.html │ │ ├── Texture.html │ │ ├── Texture2D.html │ │ ├── TmxFile2D.html │ │ ├── Viewport.html │ │ ├── Zone.html │ │ └── index.html │ ├── index.html │ ├── input │ │ ├── Input.html │ │ └── index.html │ ├── math │ │ ├── Color.html │ │ ├── ColorBase.html │ │ ├── IntVector2.html │ │ ├── Maths.html │ │ ├── Quaternion.html │ │ ├── QuaternionBase.html │ │ ├── Rect.html │ │ ├── Vector2.html │ │ ├── Vector2Base.html │ │ ├── Vector3.html │ │ ├── Vector3Base.html │ │ └── index.html │ ├── nodes │ │ ├── Physics2DNode.html │ │ └── index.html │ ├── physics │ │ ├── PhysicsRaycastResult.html │ │ ├── PhysicsRaycastResult2D.html │ │ └── index.html │ ├── resource │ │ ├── ResourceCache.html │ │ └── index.html │ ├── scene │ │ ├── Scene.html │ │ └── index.html │ └── systems │ │ ├── Physics2DSystem.html │ │ └── index.html ├── haxe-nav.css ├── haxe │ ├── Constructible.html │ ├── EnumTools.html │ ├── EnumValueTools.html │ ├── FlatEnum.html │ ├── Function.html │ ├── IMap.html │ ├── Log.html │ ├── PosInfos.html │ ├── ds │ │ ├── HashMap.html │ │ ├── IntMap.html │ │ ├── ObjectMap.html │ │ ├── StringMap.html │ │ └── index.html │ └── index.html ├── highlighter.css ├── highlighter.js ├── index.html ├── index.js ├── jquery-1.9.1.min.js ├── nav.js ├── styles.css ├── triangle-closed.png └── triangle-opened.png ├── res ├── coreData │ ├── Materials │ │ └── DefaultGrey.xml │ ├── RenderPaths │ │ ├── Deferred.xml │ │ ├── DeferredHWDepth.xml │ │ ├── Forward.xml │ │ ├── ForwardDepth.xml │ │ ├── ForwardHWDepth.xml │ │ ├── PBRDeferred.xml │ │ ├── PBRDeferredHWDepth.xml │ │ ├── Prepass.xml │ │ ├── PrepassHDR.xml │ │ └── PrepassHWDepth.xml │ ├── Shaders │ │ ├── GLSL │ │ │ ├── AutoExposure.glsl │ │ │ ├── BRDF.glsl │ │ │ ├── Basic.glsl │ │ │ ├── Bloom.glsl │ │ │ ├── BloomHDR.glsl │ │ │ ├── Blur.glsl │ │ │ ├── ColorCorrection.glsl │ │ │ ├── Constants.glsl │ │ │ ├── CopyFramebuffer.glsl │ │ │ ├── DeferredLight.glsl │ │ │ ├── Depth.glsl │ │ │ ├── FXAA2.glsl │ │ │ ├── FXAA3.glsl │ │ │ ├── Fog.glsl │ │ │ ├── GammaCorrection.glsl │ │ │ ├── GreyScale.glsl │ │ │ ├── IBL.glsl │ │ │ ├── Lighting.glsl │ │ │ ├── LitParticle.glsl │ │ │ ├── LitSolid.glsl │ │ │ ├── PBR.glsl │ │ │ ├── PBRDeferred.glsl │ │ │ ├── PBRLitSolid.glsl │ │ │ ├── PostProcess.glsl │ │ │ ├── PrepassLight.glsl │ │ │ ├── Samplers.glsl │ │ │ ├── ScreenPos.glsl │ │ │ ├── Shadow.glsl │ │ │ ├── ShadowBlur.glsl │ │ │ ├── Skybox.glsl │ │ │ ├── Skydome.glsl │ │ │ ├── Stencil.glsl │ │ │ ├── TerrainBlend.glsl │ │ │ ├── Text.glsl │ │ │ ├── Tonemap.glsl │ │ │ ├── Transform.glsl │ │ │ ├── Uniforms.glsl │ │ │ ├── Unlit.glsl │ │ │ ├── UnlitParticle.glsl │ │ │ ├── Urho2D.glsl │ │ │ ├── Vegetation.glsl │ │ │ ├── VegetationDepth.glsl │ │ │ ├── VegetationShadow.glsl │ │ │ └── Water.glsl │ │ └── HLSL │ │ │ ├── AutoExposure.hlsl │ │ │ ├── BRDF.hlsl │ │ │ ├── Basic.hlsl │ │ │ ├── Bloom.hlsl │ │ │ ├── BloomHDR.hlsl │ │ │ ├── Blur.hlsl │ │ │ ├── ClearFramebuffer.hlsl │ │ │ ├── ColorCorrection.hlsl │ │ │ ├── Constants.hlsl │ │ │ ├── CopyFramebuffer.hlsl │ │ │ ├── DeferredLight.hlsl │ │ │ ├── Depth.hlsl │ │ │ ├── FXAA2.hlsl │ │ │ ├── FXAA3.hlsl │ │ │ ├── Fog.hlsl │ │ │ ├── GammaCorrection.hlsl │ │ │ ├── GreyScale.hlsl │ │ │ ├── IBL.hlsl │ │ │ ├── Lighting.hlsl │ │ │ ├── LitParticle.hlsl │ │ │ ├── LitSolid.hlsl │ │ │ ├── PBR.hlsl │ │ │ ├── PBRDeferred.hlsl │ │ │ ├── PBRLitSolid.hlsl │ │ │ ├── PostProcess.hlsl │ │ │ ├── PrepassLight.hlsl │ │ │ ├── Samplers.hlsl │ │ │ ├── ScreenPos.hlsl │ │ │ ├── Shadow.hlsl │ │ │ ├── ShadowBlur.hlsl │ │ │ ├── Skybox.hlsl │ │ │ ├── Skydome.hlsl │ │ │ ├── Stencil.hlsl │ │ │ ├── TerrainBlend.hlsl │ │ │ ├── Text.hlsl │ │ │ ├── Tonemap.hlsl │ │ │ ├── Transform.hlsl │ │ │ ├── Uniforms.hlsl │ │ │ ├── Unlit.hlsl │ │ │ ├── UnlitParticle.hlsl │ │ │ ├── Urho2D.hlsl │ │ │ ├── Vegetation.hlsl │ │ │ ├── VegetationDepth.hlsl │ │ │ ├── VegetationShadow.hlsl │ │ │ └── Water.hlsl │ ├── Techniques │ │ ├── BasicVColUnlitAlpha.xml │ │ ├── Diff.xml │ │ ├── DiffAO.xml │ │ ├── DiffAOAlpha.xml │ │ ├── DiffAOAlphaMask.xml │ │ ├── DiffAdd.xml │ │ ├── DiffAddAlpha.xml │ │ ├── DiffAlpha.xml │ │ ├── DiffAlphaMask.xml │ │ ├── DiffAlphaTranslucent.xml │ │ ├── DiffEmissive.xml │ │ ├── DiffEmissiveAlpha.xml │ │ ├── DiffEnvCube.xml │ │ ├── DiffEnvCubeAO.xml │ │ ├── DiffEnvCubeAOAlpha.xml │ │ ├── DiffEnvCubeAlpha.xml │ │ ├── DiffLightMap.xml │ │ ├── DiffLightMapAlpha.xml │ │ ├── DiffLitParticleAlpha.xml │ │ ├── DiffLitParticleAlphaSoft.xml │ │ ├── DiffLitParticleAlphaSoftExpand.xml │ │ ├── DiffMultiply.xml │ │ ├── DiffNormal.xml │ │ ├── DiffNormalAO.xml │ │ ├── DiffNormalAOAlpha.xml │ │ ├── DiffNormalAOAlphaMask.xml │ │ ├── DiffNormalAlpha.xml │ │ ├── DiffNormalAlphaMask.xml │ │ ├── DiffNormalAlphaTranslucent.xml │ │ ├── DiffNormalEmissive.xml │ │ ├── DiffNormalEmissiveAlpha.xml │ │ ├── DiffNormalEnvCube.xml │ │ ├── DiffNormalEnvCubeAlpha.xml │ │ ├── DiffNormalPacked.xml │ │ ├── DiffNormalPackedAO.xml │ │ ├── DiffNormalPackedAOAlpha.xml │ │ ├── DiffNormalPackedAOAlphaMask.xml │ │ ├── DiffNormalPackedAlpha.xml │ │ ├── DiffNormalPackedAlphaMask.xml │ │ ├── DiffNormalPackedEmissive.xml │ │ ├── DiffNormalPackedEmissiveAlpha.xml │ │ ├── DiffNormalPackedEnvCube.xml │ │ ├── DiffNormalPackedEnvCubeAlpha.xml │ │ ├── DiffNormalPackedSpec.xml │ │ ├── DiffNormalPackedSpecAO.xml │ │ ├── DiffNormalPackedSpecAOAlpha.xml │ │ ├── DiffNormalPackedSpecAOAlphaMask.xml │ │ ├── DiffNormalPackedSpecAlpha.xml │ │ ├── DiffNormalPackedSpecAlphaMask.xml │ │ ├── DiffNormalPackedSpecEmissive.xml │ │ ├── DiffNormalPackedSpecEmissiveAlpha.xml │ │ ├── DiffNormalSpec.xml │ │ ├── DiffNormalSpecAO.xml │ │ ├── DiffNormalSpecAOAlpha.xml │ │ ├── DiffNormalSpecAOAlphaMask.xml │ │ ├── DiffNormalSpecAlpha.xml │ │ ├── DiffNormalSpecAlphaMask.xml │ │ ├── DiffNormalSpecEmissive.xml │ │ ├── DiffNormalSpecEmissiveAlpha.xml │ │ ├── DiffOverlay.xml │ │ ├── DiffSkybox.xml │ │ ├── DiffSkyboxHDRScale.xml │ │ ├── DiffSkydome.xml │ │ ├── DiffSkyplane.xml │ │ ├── DiffSpec.xml │ │ ├── DiffSpecAlpha.xml │ │ ├── DiffSpecAlphaMask.xml │ │ ├── DiffUnlit.xml │ │ ├── DiffUnlitAlpha.xml │ │ ├── DiffUnlitAlphaMask.xml │ │ ├── DiffUnlitParticleAdd.xml │ │ ├── DiffUnlitParticleAddSoft.xml │ │ ├── DiffUnlitParticleAddSoftExpand.xml │ │ ├── DiffUnlitParticleAlpha.xml │ │ ├── DiffUnlitParticleAlphaSoft.xml │ │ ├── DiffUnlitParticleAlphaSoftExpand.xml │ │ ├── DiffVCol.xml │ │ ├── DiffVColAdd.xml │ │ ├── DiffVColAddAlpha.xml │ │ ├── DiffVColMultiply.xml │ │ ├── DiffVColUnlitAlpha.xml │ │ ├── NoTexture.xml │ │ ├── NoTextureAO.xml │ │ ├── NoTextureAOAlpha.xml │ │ ├── NoTextureAdd.xml │ │ ├── NoTextureAddAlpha.xml │ │ ├── NoTextureAlpha.xml │ │ ├── NoTextureEnvCube.xml │ │ ├── NoTextureEnvCubeAO.xml │ │ ├── NoTextureEnvCubeAOAlpha.xml │ │ ├── NoTextureEnvCubeAlpha.xml │ │ ├── NoTextureMultiply.xml │ │ ├── NoTextureNormal.xml │ │ ├── NoTextureNormalAlpha.xml │ │ ├── NoTextureNormalPacked.xml │ │ ├── NoTextureNormalPackedAlpha.xml │ │ ├── NoTextureOverlay.xml │ │ ├── NoTextureUnlit.xml │ │ ├── NoTextureUnlitAlpha.xml │ │ ├── NoTextureUnlitVCol.xml │ │ ├── NoTextureVCol.xml │ │ ├── NoTextureVColAdd.xml │ │ ├── NoTextureVColAddAlpha.xml │ │ ├── NoTextureVColMultiply.xml │ │ ├── PBR │ │ │ ├── DiffNormalSpecEmissive.xml │ │ │ ├── DiffNormalSpecEmissiveAlpha.xml │ │ │ ├── PBRDiff.xml │ │ │ ├── PBRDiffAlpha.xml │ │ │ ├── PBRDiffNormal.xml │ │ │ ├── PBRDiffNormalAlpha.xml │ │ │ ├── PBRDiffNormalEmissive.xml │ │ │ ├── PBRDiffNormalEmissiveAlpha.xml │ │ │ ├── PBRMetallicRoughDiffNormalSpec.xml │ │ │ ├── PBRMetallicRoughDiffNormalSpecEmissive.xml │ │ │ ├── PBRMetallicRoughDiffNormalSpecEmissiveAlpha.xml │ │ │ ├── PBRMetallicRoughDiffSpec.xml │ │ │ ├── PBRMetallicRoughDiffSpecAlpha.xml │ │ │ ├── PBRNoTexture.xml │ │ │ └── PBRNoTextureAlpha.xml │ │ ├── TerrainBlend.xml │ │ ├── VegetationDiff.xml │ │ ├── VegetationDiffAlphaMask.xml │ │ ├── VegetationDiffUnlit.xml │ │ ├── VegetationDiffUnlitAlphaMask.xml │ │ └── Water.xml │ └── Textures │ │ ├── LUTIdentity.png │ │ ├── LUTIdentity.xml │ │ ├── Ramp.png │ │ ├── Ramp.xml │ │ ├── RampExtreme.png │ │ ├── RampExtreme.xml │ │ ├── RampWide.png │ │ ├── RampWide.xml │ │ ├── Spot.png │ │ ├── Spot.xml │ │ ├── SpotWide.png │ │ └── SpotWide.xml └── data │ └── .empty ├── scripts ├── activate ├── common.py ├── dist │ ├── gengine-compile.bat │ ├── gengine-compile.sh │ ├── gengine-run.bat │ ├── gengine-run.sh │ └── gengine.sh ├── emscripten.py ├── gengine-build ├── gengine-compile ├── gengine-gen-bindings ├── gengine-gen-classes ├── gengine-gen-dist ├── gengine-gen-doc ├── gengine-pack └── gengine-run ├── src ├── application │ ├── application.cpp │ ├── application.h │ ├── application_app.cpp │ ├── application_app.h │ ├── application_init.js │ └── application_preinit.js ├── bindings │ ├── bindings.h │ ├── bindings_application.cpp │ ├── bindings_audio.cpp │ ├── bindings_graphics.cpp │ ├── bindings_input.cpp │ ├── bindings_math.cpp │ ├── bindings_physics.cpp │ ├── bindings_resource.cpp │ ├── bindings_scene.cpp │ ├── bindings_urho2d.cpp │ ├── rules.json │ └── templates │ │ ├── bindings.cpp.mustache │ │ └── component.hx.mustache ├── doc │ ├── generate.hxml │ └── src │ │ └── Application.hx ├── gui │ ├── gui.cpp │ ├── gui.h │ ├── gui_cef_app.cpp │ ├── gui_cef_app.h │ ├── gui_cef_handler.cpp │ ├── gui_cef_handler.h │ ├── gui_system.cpp │ └── gui_system.h ├── haxe │ └── gengine │ │ ├── Engine.hx │ │ ├── Entity.hx │ │ ├── Gengine.hx │ │ ├── Main.hx │ │ ├── Node.hx │ │ ├── System.hx │ │ ├── audio │ │ ├── Audio.hx │ │ └── Sound.hx │ │ ├── components │ │ └── Component.hx │ │ ├── core │ │ └── Context.hx │ │ ├── graphics │ │ ├── Animation.hx │ │ ├── AnimationSet2D.hx │ │ ├── AnimationState.hx │ │ ├── BiasParameters.hx │ │ ├── CascadeParameters.hx │ │ ├── Image.hx │ │ ├── Material.hx │ │ ├── Model.hx │ │ ├── ParticleEffect.hx │ │ ├── ParticleEffect2D.hx │ │ ├── Renderer.hx │ │ ├── Skeleton.hx │ │ ├── Sprite2D.hx │ │ ├── Texture.hx │ │ ├── Texture2D.hx │ │ ├── TmxFile2D.hx │ │ ├── Viewport.hx │ │ └── Zone.hx │ │ ├── input │ │ └── Input.hx │ │ ├── math │ │ ├── Color.hx │ │ ├── IntVector2.hx │ │ ├── Maths.hx │ │ ├── Quaternion.hx │ │ ├── Rect.hx │ │ ├── Vector2.hx │ │ └── Vector3.hx │ │ ├── nodes │ │ └── Physics2DNode.hx │ │ ├── physics │ │ ├── PhysicsRaycastResult.hx │ │ └── PhysicsRaycastResult2D.hx │ │ ├── resource │ │ └── ResourceCache.hx │ │ ├── scene │ │ └── Scene.hx │ │ └── systems │ │ └── Physics2DSystem.hx ├── kernel │ └── singleton.h ├── main.cpp └── shell.html └── test ├── Application.hx ├── data ├── .empty └── sound.ogg └── gui └── test.html /.atom-build.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": "make", 3 | "name": "debug", 4 | "args": [ "config=debug64", "-j8" ], 5 | "sh": false, 6 | "cwd": "{PROJECT_PATH}/build/", 7 | "env": { 8 | }, 9 | "errorMatch": "\n(?[\\/0-9a-zA-Z\\._]+):(?\\d+):(?\\d+)", 10 | "keymap": "f7", 11 | "targets": { 12 | "emscripten": { 13 | "cmd": "emmake", 14 | "name": "emscripten-debug", 15 | "args": [ "make", "config=debugemscripten64", "-j8" ], 16 | "sh": false, 17 | "cwd": "{PROJECT_PATH}/build/", 18 | "env": { 19 | }, 20 | "errorMatch": "\n(?[\\/0-9a-zA-Z\\._]+):(?\\d+):(?\\d+)", 21 | "keymap": "f8" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | scripts/__pycache__ 31 | build/Makefile 32 | build/obj 33 | build/gengine* 34 | build/*.dll 35 | build/*.exe 36 | build/error.txt 37 | build/index.* 38 | libcef.so 39 | deps/*/lib*/*.so* 40 | deps/*/lib*/*.dll 41 | deps/*/lib*/*.lib 42 | deps/*/lib*/*.txt 43 | deps/*/lib*/libcef_dll_wrapper* 44 | *.tar.gz 45 | *.data 46 | deps/**/*.a 47 | deps/**/*.make 48 | deps/**/Makefile 49 | deps/**/obj/ 50 | debug.log 51 | *.config 52 | *.creator 53 | *.creator.user 54 | *.files 55 | *.includes 56 | *.log 57 | generated 58 | /test/packed-* 59 | /test/index.* 60 | /test/screenshot.png 61 | /doc/pages 62 | 63 | callgrind* 64 | valgrind* 65 | vgcore* 66 | 67 | /dist 68 | tags 69 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/common/libembindcefv8"] 2 | path = deps/common/libembindcefv8 3 | url = https://github.com/gogoprog/libembindcefv8.git 4 | [submodule "deps/common/Ash-Haxe"] 5 | path = deps/common/Ash-Haxe 6 | url = https://github.com/gogoprog/Ash-Haxe.git 7 | [submodule "deps/common/Urho3D"] 8 | path = deps/common/Urho3D 9 | url = https://github.com/gogoprog/Urho3D.git 10 | branch = gengine 11 | [submodule "deps/common/tbing"] 12 | path = deps/common/tbing 13 | url = https://github.com/gogoprog/tbing.git 14 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | let $PROJECT_ROOT = getcwd() 2 | map :!gengine-run -d $PROJECT_ROOT/test 3 | map :Make -C $PROJECT_ROOT/build config=debug64 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "/bin/python2", 3 | "files.associations": { 4 | "functional": "cpp", 5 | "utility": "cpp", 6 | "type_traits": "cpp", 7 | "array": "cpp", 8 | "*.tcc": "cpp", 9 | "bitset": "cpp", 10 | "cctype": "cpp", 11 | "chrono": "cpp", 12 | "clocale": "cpp", 13 | "cmath": "cpp", 14 | "codecvt": "cpp", 15 | "condition_variable": "cpp", 16 | "cstdarg": "cpp", 17 | "cstddef": "cpp", 18 | "cstdint": "cpp", 19 | "cstdio": "cpp", 20 | "cstdlib": "cpp", 21 | "cstring": "cpp", 22 | "ctime": "cpp", 23 | "cwchar": "cpp", 24 | "cwctype": "cpp", 25 | "exception": "cpp", 26 | "fstream": "cpp", 27 | "initializer_list": "cpp", 28 | "iomanip": "cpp", 29 | "iosfwd": "cpp", 30 | "iostream": "cpp", 31 | "istream": "cpp", 32 | "limits": "cpp", 33 | "memory": "cpp", 34 | "mutex": "cpp", 35 | "new": "cpp", 36 | "numeric": "cpp", 37 | "optional": "cpp", 38 | "ostream": "cpp", 39 | "ratio": "cpp", 40 | "sstream": "cpp", 41 | "stdexcept": "cpp", 42 | "streambuf": "cpp", 43 | "string_view": "cpp", 44 | "system_error": "cpp", 45 | "thread": "cpp", 46 | "tuple": "cpp", 47 | "typeinfo": "cpp", 48 | "algorithm": "cpp" 49 | } 50 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Gauthier Billot 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gengine 2 | 3 | A game framework that combines Haxe, Ash, HTML5 and Urho3D. 4 | 5 | ## Features 6 | 7 | * Gameplay code in Haxe (JavaScript support through v8 or embind) 8 | * Ash framework integrated 9 | * UI in HTML5 (Chromium Embedded Framework on native platforms) 10 | * Most Urho3D features 11 | * HTML5 WebGL target support 12 | 13 | ## Documentation 14 | 15 | [Generated doc pages](http://gogoprog.github.io/gengine/doc/pages/) 16 | 17 | ## Usage 18 | 19 | ### Distribution release 20 | 21 | The distributed release provides an emscripten build of the gengine. 22 | A local http server is used to run the applications. 23 | 24 | #### Requirements 25 | 26 | * [python3](https://www.python.org/downloads/) 27 | * [haxe](https://haxe.org/download/) 28 | 29 | #### Commands 30 | 31 | ##### Helpers 32 | 33 | Those are the scripts located at the root of the gengine distributed release. 34 | 35 | ./gengine.sh 36 | # Activates the gengine commands 37 | 38 | ./gengine-compile.(bat/sh) [path-to-your-application] 39 | # Compiles the application haxe code. 40 | 41 | ./gengine-run.(bat/sh) [path-to-your-application] 42 | # Compiles and runs the local server 43 | 44 | ##### gengine commands 45 | 46 | gengine-compile [path-to-your-application] 47 | # To compile your Haxe code 48 | 49 | gengine-run [path-to-your-application] 50 | # To compile and run the local server 51 | 52 | ### Development 53 | 54 | Activate the gengine environment : 55 | 56 | source path/to/gengine/scripts/activate 57 | 58 | First time build including Urho3D : 59 | 60 | gengine-build --urho3d [-d] [--html5] [path-to-your-application-code] 61 | 62 | Next times build : 63 | 64 | gengine-build [-d] [--html5] [path-to-your-application-code] 65 | 66 | Build and run on native platforms : 67 | 68 | gengine-run [-d] [path-to-your-application-code] 69 | -------------------------------------------------------------------------------- /build/clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf obj gengine* Makefile 4 | 5 | -------------------------------------------------------------------------------- /build/locales/am.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/am.pak -------------------------------------------------------------------------------- /build/locales/ar.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ar.pak -------------------------------------------------------------------------------- /build/locales/bg.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/bg.pak -------------------------------------------------------------------------------- /build/locales/bn.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/bn.pak -------------------------------------------------------------------------------- /build/locales/ca.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ca.pak -------------------------------------------------------------------------------- /build/locales/cs.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/cs.pak -------------------------------------------------------------------------------- /build/locales/da.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/da.pak -------------------------------------------------------------------------------- /build/locales/de.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/de.pak -------------------------------------------------------------------------------- /build/locales/el.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/el.pak -------------------------------------------------------------------------------- /build/locales/en-GB.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/en-GB.pak -------------------------------------------------------------------------------- /build/locales/en-US.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/en-US.pak -------------------------------------------------------------------------------- /build/locales/es-419.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/es-419.pak -------------------------------------------------------------------------------- /build/locales/es.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/es.pak -------------------------------------------------------------------------------- /build/locales/et.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/et.pak -------------------------------------------------------------------------------- /build/locales/fa.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/fa.pak -------------------------------------------------------------------------------- /build/locales/fi.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/fi.pak -------------------------------------------------------------------------------- /build/locales/fil.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/fil.pak -------------------------------------------------------------------------------- /build/locales/fr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/fr.pak -------------------------------------------------------------------------------- /build/locales/gu.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/gu.pak -------------------------------------------------------------------------------- /build/locales/he.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/he.pak -------------------------------------------------------------------------------- /build/locales/hi.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/hi.pak -------------------------------------------------------------------------------- /build/locales/hr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/hr.pak -------------------------------------------------------------------------------- /build/locales/hu.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/hu.pak -------------------------------------------------------------------------------- /build/locales/id.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/id.pak -------------------------------------------------------------------------------- /build/locales/it.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/it.pak -------------------------------------------------------------------------------- /build/locales/ja.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ja.pak -------------------------------------------------------------------------------- /build/locales/kn.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/kn.pak -------------------------------------------------------------------------------- /build/locales/ko.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ko.pak -------------------------------------------------------------------------------- /build/locales/lt.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/lt.pak -------------------------------------------------------------------------------- /build/locales/lv.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/lv.pak -------------------------------------------------------------------------------- /build/locales/ml.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ml.pak -------------------------------------------------------------------------------- /build/locales/mr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/mr.pak -------------------------------------------------------------------------------- /build/locales/ms.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ms.pak -------------------------------------------------------------------------------- /build/locales/nb.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/nb.pak -------------------------------------------------------------------------------- /build/locales/nl.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/nl.pak -------------------------------------------------------------------------------- /build/locales/pl.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/pl.pak -------------------------------------------------------------------------------- /build/locales/pt-BR.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/pt-BR.pak -------------------------------------------------------------------------------- /build/locales/pt-PT.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/pt-PT.pak -------------------------------------------------------------------------------- /build/locales/ro.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ro.pak -------------------------------------------------------------------------------- /build/locales/ru.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ru.pak -------------------------------------------------------------------------------- /build/locales/sk.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/sk.pak -------------------------------------------------------------------------------- /build/locales/sl.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/sl.pak -------------------------------------------------------------------------------- /build/locales/sr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/sr.pak -------------------------------------------------------------------------------- /build/locales/sv.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/sv.pak -------------------------------------------------------------------------------- /build/locales/sw.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/sw.pak -------------------------------------------------------------------------------- /build/locales/ta.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/ta.pak -------------------------------------------------------------------------------- /build/locales/te.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/te.pak -------------------------------------------------------------------------------- /build/locales/th.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/th.pak -------------------------------------------------------------------------------- /build/locales/tr.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/tr.pak -------------------------------------------------------------------------------- /build/locales/uk.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/uk.pak -------------------------------------------------------------------------------- /build/locales/vi.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/vi.pak -------------------------------------------------------------------------------- /build/locales/zh-CN.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/zh-CN.pak -------------------------------------------------------------------------------- /build/locales/zh-TW.pak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/build/locales/zh-TW.pak -------------------------------------------------------------------------------- /build/test.hxml: -------------------------------------------------------------------------------- 1 | -cp ../deps/common/Ash-Haxe/src/ 2 | -cp ../src/haxe/ 3 | -cp ../test/ 4 | -main gengine.Main 5 | -js ../test/generated/main.js 6 | -------------------------------------------------------------------------------- /deps/linux/include/cef/include/internal/cef_export.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 32 | #define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 33 | #pragma once 34 | 35 | #include "include/internal/cef_build.h" 36 | 37 | #if defined(COMPILER_MSVC) 38 | 39 | #ifdef BUILDING_CEF_SHARED 40 | #define CEF_EXPORT __declspec(dllexport) 41 | #elif USING_CEF_SHARED 42 | #define CEF_EXPORT __declspec(dllimport) 43 | #else 44 | #define CEF_EXPORT 45 | #endif 46 | #define CEF_CALLBACK __stdcall 47 | 48 | #elif defined(COMPILER_GCC) 49 | 50 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 51 | #define CEF_CALLBACK 52 | 53 | #endif // COMPILER_GCC 54 | 55 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 56 | -------------------------------------------------------------------------------- /deps/linux/lib64/get-libs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wget http://dl.bintray.com/gogoprog/gengine/linux-64.tar.gz 4 | tar xvfz linux-64.tar.gz 5 | wget https://bintray.com/artifact/download/gogoprog/gengine/linux64/libasound.so.2 6 | wget https://bintray.com/artifact/download/gogoprog/gengine/linux64/libdbus-glib-1.so.2 7 | wget https://bintray.com/artifact/download/gogoprog/gengine/linux64/libgconf-2.so.4 8 | wget https://bintray.com/artifact/download/gogoprog/gengine/linux64/libudev.so.0 9 | wget https://bintray.com/artifact/download/gogoprog/gengine/linux64/libXtst.so.6 10 | -------------------------------------------------------------------------------- /deps/windows/include/cef/include/internal/cef_export.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 32 | #define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 33 | #pragma once 34 | 35 | #include "include/internal/cef_build.h" 36 | 37 | #if defined(COMPILER_MSVC) 38 | 39 | #ifdef BUILDING_CEF_SHARED 40 | #define CEF_EXPORT __declspec(dllexport) 41 | #elif USING_CEF_SHARED 42 | #define CEF_EXPORT __declspec(dllimport) 43 | #else 44 | #define CEF_EXPORT 45 | #endif 46 | #define CEF_CALLBACK __stdcall 47 | 48 | #elif defined(COMPILER_GCC) 49 | 50 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 51 | #define CEF_CALLBACK 52 | 53 | #endif // COMPILER_GCC 54 | 55 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 56 | -------------------------------------------------------------------------------- /deps/windows/lib/get-libs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | wget http://dl.bintray.com/gogoprog/gengine/windows-32.tar.gz 4 | tar xvfz windows-32.tar.gz 5 | 6 | -------------------------------------------------------------------------------- /docs/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/docs/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/docs/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/docs/favicon.ico -------------------------------------------------------------------------------- /docs/highlighter.css: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | Code Highlighting 4 | **/ 5 | 6 | html pre, html pre code { 7 | font-family: consolas, monospace; 8 | white-space: pre; 9 | overflow-x: auto; 10 | } 11 | pre { 12 | color: #333; 13 | margin: 15px 0; 14 | padding: 0.5em; 15 | } 16 | pre .type { 17 | color: #0086b3; 18 | } 19 | pre .kwd { 20 | color: #00a; 21 | } 22 | pre .val { 23 | color: #44a; 24 | } 25 | pre .str, div.pre .str, pre .str .kwd, pre .str .val, pre .str .type { 26 | color: #a00; 27 | } 28 | pre .cmt { 29 | color: #008800; 30 | color: #998; 31 | font-style: italic; 32 | } 33 | /* Make sure keywords inside comments are not highlighted*/ 34 | pre .cmt .kwd, pre .cmt .str, pre .cmt .val, pre .cmt .type { 35 | color: #998; 36 | } 37 | 38 | .last-modified { 39 | color:#999; 40 | } -------------------------------------------------------------------------------- /docs/highlighter.js: -------------------------------------------------------------------------------- 1 | // highlighter adapted from code.haxe.org 2 | (function (console) { "use strict"; 3 | var EReg = function(r,opt) { 4 | opt = opt.split("u").join(""); 5 | this.r = new RegExp(r,opt); 6 | }; 7 | EReg.prototype = { 8 | replace: function(s,by) { 9 | return s.replace(this.r,by); 10 | } 11 | }; 12 | var Highlighter = function() { }; 13 | Highlighter.main = function() { 14 | js.JQuery("pre code").each(function() { 15 | var el = js.JQuery(this); 16 | if(!el.hasClass("highlighted")) { 17 | el.html(Highlighter.syntaxHighlight(el.html())); 18 | el.addClass("highlighted"); 19 | } 20 | }); 21 | }; 22 | Highlighter.syntaxHighlight = function(html) { 23 | var kwds = ["abstract","trace","break","case","cast","class","continue","default","do","dynamic","else","enum","extends","extern","for","function","if","implements","import","in","inline","interface","macro","new","override","package","private","public","return","static","switch","throw","try","typedef","untyped","using","var","while"]; 24 | var kwds1 = new EReg("\\b(" + kwds.join("|") + ")\\b","g"); 25 | var vals = ["null","true","false","this"]; 26 | var vals1 = new EReg("\\b(" + vals.join("|") + ")\\b","g"); 27 | var types = new EReg("\\b([A-Z][a-zA-Z0-9]*)\\b","g"); 28 | html = kwds1.replace(html,"$1"); 29 | html = vals1.replace(html,"$1"); 30 | html = types.replace(html,"$1"); 31 | html = new EReg("(\"[^\"]*\")","g").replace(html,"$1"); 32 | html = new EReg("(//.+\n)","g").replace(html,"$1"); 33 | html = new EReg("(/\\*\\*?[^*]*\\*?\\*/)","g").replace(html,"$1"); 34 | return html; 35 | }; 36 | var q = window.jQuery; 37 | var js = js || {} 38 | js.JQuery = q; 39 | Highlighter.main(); 40 | })(typeof console != "undefined" ? console : {log:function(){}}); -------------------------------------------------------------------------------- /docs/triangle-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/docs/triangle-closed.png -------------------------------------------------------------------------------- /docs/triangle-opened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/docs/triangle-opened.png -------------------------------------------------------------------------------- /res/coreData/Materials/DefaultGrey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/Deferred.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/DeferredHWDepth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/Forward.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/ForwardDepth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/ForwardHWDepth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/PBRDeferred.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/PBRDeferredHWDepth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/Prepass.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/PrepassHDR.xml: -------------------------------------------------------------------------------- 1 | 2 | rgba16f 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/RenderPaths/PrepassHWDepth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Basic.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | 5 | #if defined(DIFFMAP) || defined(ALPHAMAP) 6 | varying vec2 vTexCoord; 7 | #endif 8 | #ifdef VERTEXCOLOR 9 | varying vec4 vColor; 10 | #endif 11 | 12 | void VS() 13 | { 14 | mat4 modelMatrix = iModelMatrix; 15 | vec3 worldPos = GetWorldPos(modelMatrix); 16 | gl_Position = GetClipPos(worldPos); 17 | 18 | #ifdef DIFFMAP 19 | vTexCoord = iTexCoord; 20 | #endif 21 | #ifdef VERTEXCOLOR 22 | vColor = iColor; 23 | #endif 24 | } 25 | 26 | void PS() 27 | { 28 | vec4 diffColor = cMatDiffColor; 29 | 30 | #ifdef VERTEXCOLOR 31 | diffColor *= vColor; 32 | #endif 33 | 34 | #if (!defined(DIFFMAP)) && (!defined(ALPHAMAP)) 35 | gl_FragColor = diffColor; 36 | #endif 37 | #ifdef DIFFMAP 38 | vec4 diffInput = texture2D(sDiffMap, vTexCoord); 39 | #ifdef ALPHAMASK 40 | if (diffInput.a < 0.5) 41 | discard; 42 | #endif 43 | gl_FragColor = diffColor * diffInput; 44 | #endif 45 | #ifdef ALPHAMAP 46 | #ifdef GL3 47 | float alphaInput = texture2D(sDiffMap, vTexCoord).r; 48 | #else 49 | float alphaInput = texture2D(sDiffMap, vTexCoord).a; 50 | #endif 51 | gl_FragColor = vec4(diffColor.rgb, diffColor.a * alphaInput); 52 | #endif 53 | } 54 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Bloom.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | 6 | varying vec2 vTexCoord; 7 | varying vec2 vScreenPos; 8 | 9 | #ifdef COMPILEPS 10 | uniform float cBloomThreshold; 11 | uniform vec2 cBloomMix; 12 | uniform vec2 cBlurHInvSize; 13 | #endif 14 | 15 | void VS() 16 | { 17 | mat4 modelMatrix = iModelMatrix; 18 | vec3 worldPos = GetWorldPos(modelMatrix); 19 | gl_Position = GetClipPos(worldPos); 20 | vTexCoord = GetQuadTexCoord(gl_Position); 21 | vScreenPos = GetScreenPosPreDiv(gl_Position); 22 | } 23 | 24 | void PS() 25 | { 26 | #ifdef BRIGHT 27 | vec3 rgb = texture2D(sDiffMap, vScreenPos).rgb; 28 | gl_FragColor = vec4((rgb - vec3(cBloomThreshold, cBloomThreshold, cBloomThreshold)) / (1.0 - cBloomThreshold), 1.0); 29 | #endif 30 | 31 | #ifdef BLURH 32 | vec3 rgb = texture2D(sDiffMap, vTexCoord + vec2(-2.0, 0.0) * cBlurHInvSize).rgb * 0.1; 33 | rgb += texture2D(sDiffMap, vTexCoord + vec2(-1.0, 0.0) * cBlurHInvSize).rgb * 0.25; 34 | rgb += texture2D(sDiffMap, vTexCoord + vec2(0.0, 0.0) * cBlurHInvSize).rgb * 0.3; 35 | rgb += texture2D(sDiffMap, vTexCoord + vec2(1.0, 0.0) * cBlurHInvSize).rgb * 0.25; 36 | rgb += texture2D(sDiffMap, vTexCoord + vec2(2.0, 0.0) * cBlurHInvSize).rgb * 0.1; 37 | gl_FragColor = vec4(rgb, 1.0); 38 | #endif 39 | 40 | #ifdef BLURV 41 | vec3 rgb = texture2D(sDiffMap, vTexCoord + vec2(0.0, -2.0) * cBlurHInvSize).rgb * 0.1; 42 | rgb += texture2D(sDiffMap, vTexCoord + vec2(0.0, -1.0) * cBlurHInvSize).rgb * 0.25; 43 | rgb += texture2D(sDiffMap, vTexCoord + vec2(0.0, 0.0) * cBlurHInvSize).rgb * 0.3; 44 | rgb += texture2D(sDiffMap, vTexCoord + vec2(0.0, 1.0) * cBlurHInvSize).rgb * 0.25; 45 | rgb += texture2D(sDiffMap, vTexCoord + vec2(0.0, 2.0) * cBlurHInvSize).rgb * 0.1; 46 | gl_FragColor = vec4(rgb, 1.0); 47 | #endif 48 | 49 | #ifdef COMBINE 50 | vec3 original = texture2D(sDiffMap, vScreenPos).rgb * cBloomMix.x; 51 | vec3 bloom = texture2D(sNormalMap, vTexCoord).rgb * cBloomMix.y; 52 | // Prevent oversaturation 53 | original *= max(vec3(1.0) - bloom, vec3(0.0)); 54 | gl_FragColor = vec4(original + bloom, 1.0); 55 | #endif 56 | } 57 | 58 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Blur.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | #include "PostProcess.glsl" 6 | 7 | varying vec2 vTexCoord; 8 | varying vec2 vScreenPos; 9 | 10 | #ifdef COMPILEPS 11 | uniform vec2 cBlurDir; 12 | uniform float cBlurRadius; 13 | uniform float cBlurSigma; 14 | uniform vec2 cBlurHInvSize; 15 | #endif 16 | 17 | void VS() 18 | { 19 | mat4 modelMatrix = iModelMatrix; 20 | vec3 worldPos = GetWorldPos(modelMatrix); 21 | gl_Position = GetClipPos(worldPos); 22 | vTexCoord = GetQuadTexCoord(gl_Position); 23 | vScreenPos = GetScreenPosPreDiv(gl_Position); 24 | } 25 | 26 | void PS() 27 | { 28 | #ifdef BLUR3 29 | gl_FragColor = GaussianBlur(3, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, vTexCoord); 30 | #endif 31 | 32 | #ifdef BLUR5 33 | gl_FragColor = GaussianBlur(5, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, vTexCoord); 34 | #endif 35 | 36 | #ifdef BLUR7 37 | gl_FragColor = GaussianBlur(7, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, vTexCoord); 38 | #endif 39 | 40 | #ifdef BLUR9 41 | gl_FragColor = GaussianBlur(9, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, vTexCoord); 42 | #endif 43 | } 44 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/ColorCorrection.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | #include "PostProcess.glsl" 6 | 7 | varying vec2 vScreenPos; 8 | 9 | void VS() 10 | { 11 | mat4 modelMatrix = iModelMatrix; 12 | vec3 worldPos = GetWorldPos(modelMatrix); 13 | gl_Position = GetClipPos(worldPos); 14 | vScreenPos = GetScreenPosPreDiv(gl_Position); 15 | } 16 | 17 | void PS() 18 | { 19 | vec3 color = texture2D(sDiffMap, vScreenPos).rgb; 20 | gl_FragColor = vec4(ColorCorrection(color, sVolumeMap), 1.0); 21 | } 22 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Constants.glsl: -------------------------------------------------------------------------------- 1 | #define M_PI 3.14159265358979323846 2 | #define M_EPSILON 0.0001 3 | 4 | #ifdef PBR 5 | #define ROUGHNESS_FLOOR 0.003 6 | #define METALNESS_FLOOR 0.03 7 | #endif 8 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/CopyFramebuffer.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | 6 | varying vec2 vScreenPos; 7 | 8 | void VS() 9 | { 10 | mat4 modelMatrix = iModelMatrix; 11 | vec3 worldPos = GetWorldPos(modelMatrix); 12 | gl_Position = GetClipPos(worldPos); 13 | vScreenPos = GetScreenPosPreDiv(gl_Position); 14 | } 15 | 16 | void PS() 17 | { 18 | gl_FragColor = texture2D(sDiffMap, vScreenPos); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Depth.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | 5 | varying vec3 vTexCoord; 6 | 7 | void VS() 8 | { 9 | mat4 modelMatrix = iModelMatrix; 10 | vec3 worldPos = GetWorldPos(modelMatrix); 11 | gl_Position = GetClipPos(worldPos); 12 | vTexCoord = vec3(GetTexCoord(iTexCoord), GetDepth(gl_Position)); 13 | } 14 | 15 | void PS() 16 | { 17 | #ifdef ALPHAMASK 18 | float alpha = texture2D(sDiffMap, vTexCoord.xy).a; 19 | if (alpha < 0.5) 20 | discard; 21 | #endif 22 | 23 | gl_FragColor = vec4(EncodeDepth(vTexCoord.z), 1.0); 24 | } 25 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Fog.glsl: -------------------------------------------------------------------------------- 1 | #ifdef COMPILEPS 2 | vec3 GetFog(vec3 color, float fogFactor) 3 | { 4 | return mix(cFogColor, color, fogFactor); 5 | } 6 | 7 | vec3 GetLitFog(vec3 color, float fogFactor) 8 | { 9 | return color * fogFactor; 10 | } 11 | 12 | float GetFogFactor(float depth) 13 | { 14 | return clamp((cFogParams.x - depth) * cFogParams.y, 0.0, 1.0); 15 | } 16 | 17 | float GetHeightFogFactor(float depth, float height) 18 | { 19 | float fogFactor = GetFogFactor(depth); 20 | float heightFogFactor = (height - cFogParams.z) * cFogParams.w; 21 | heightFogFactor = 1.0 - clamp(exp(-(heightFogFactor * heightFogFactor)), 0.0, 1.0); 22 | return min(heightFogFactor, fogFactor); 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/GammaCorrection.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | #include "PostProcess.glsl" 6 | 7 | varying vec2 vScreenPos; 8 | 9 | void VS() 10 | { 11 | mat4 modelMatrix = iModelMatrix; 12 | vec3 worldPos = GetWorldPos(modelMatrix); 13 | gl_Position = GetClipPos(worldPos); 14 | vScreenPos = GetScreenPosPreDiv(gl_Position); 15 | } 16 | 17 | void PS() 18 | { 19 | vec3 color = texture2D(sDiffMap, vScreenPos).rgb; 20 | gl_FragColor = vec4(ToInverseGamma(color), 1.0); 21 | } 22 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/GreyScale.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | #include "Lighting.glsl" 6 | 7 | varying vec2 vScreenPos; 8 | 9 | void VS() 10 | { 11 | mat4 modelMatrix = iModelMatrix; 12 | vec3 worldPos = GetWorldPos(modelMatrix); 13 | gl_Position = GetClipPos(worldPos); 14 | vScreenPos = GetScreenPosPreDiv(gl_Position); 15 | } 16 | 17 | void PS() 18 | { 19 | vec3 rgb = texture2D(sDiffMap, vScreenPos).rgb; 20 | float intensity = GetIntensity(rgb); 21 | gl_FragColor = vec4(intensity, intensity, intensity, 1.0); 22 | } 23 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/ScreenPos.glsl: -------------------------------------------------------------------------------- 1 | #ifdef COMPILEVS 2 | mat3 GetCameraRot() 3 | { 4 | return mat3(cViewInv[0][0], cViewInv[0][1], cViewInv[0][2], 5 | cViewInv[1][0], cViewInv[1][1], cViewInv[1][2], 6 | cViewInv[2][0], cViewInv[2][1], cViewInv[2][2]); 7 | } 8 | 9 | vec4 GetScreenPos(vec4 clipPos) 10 | { 11 | return vec4( 12 | clipPos.x * cGBufferOffsets.z + cGBufferOffsets.x * clipPos.w, 13 | clipPos.y * cGBufferOffsets.w + cGBufferOffsets.y * clipPos.w, 14 | 0.0, 15 | clipPos.w); 16 | } 17 | 18 | vec2 GetScreenPosPreDiv(vec4 clipPos) 19 | { 20 | return vec2( 21 | clipPos.x / clipPos.w * cGBufferOffsets.z + cGBufferOffsets.x, 22 | clipPos.y / clipPos.w * cGBufferOffsets.w + cGBufferOffsets.y); 23 | } 24 | 25 | vec2 GetQuadTexCoord(vec4 clipPos) 26 | { 27 | return vec2( 28 | clipPos.x / clipPos.w * 0.5 + 0.5, 29 | clipPos.y / clipPos.w * 0.5 + 0.5); 30 | } 31 | 32 | vec2 GetQuadTexCoordNoFlip(vec3 worldPos) 33 | { 34 | return vec2( 35 | worldPos.x * 0.5 + 0.5, 36 | -worldPos.y * 0.5 + 0.5); 37 | } 38 | 39 | vec3 GetFarRay(vec4 clipPos) 40 | { 41 | vec3 viewRay = vec3( 42 | clipPos.x / clipPos.w * cFrustumSize.x, 43 | clipPos.y / clipPos.w * cFrustumSize.y, 44 | cFrustumSize.z); 45 | 46 | return viewRay * GetCameraRot(); 47 | } 48 | 49 | vec3 GetNearRay(vec4 clipPos) 50 | { 51 | vec3 viewRay = vec3( 52 | clipPos.x / clipPos.w * cFrustumSize.x, 53 | clipPos.y / clipPos.w * cFrustumSize.y, 54 | 0.0); 55 | 56 | return (viewRay * GetCameraRot()) * cDepthMode.x; 57 | } 58 | #endif 59 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Shadow.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | 5 | #ifdef VSM_SHADOW 6 | varying vec4 vTexCoord; 7 | #else 8 | varying vec2 vTexCoord; 9 | #endif 10 | 11 | void VS() 12 | { 13 | mat4 modelMatrix = iModelMatrix; 14 | vec3 worldPos = GetWorldPos(modelMatrix); 15 | gl_Position = GetClipPos(worldPos); 16 | #ifdef VSM_SHADOW 17 | vTexCoord = vec4(GetTexCoord(iTexCoord), gl_Position.z, gl_Position.w); 18 | #else 19 | vTexCoord = GetTexCoord(iTexCoord); 20 | #endif 21 | } 22 | 23 | void PS() 24 | { 25 | #ifdef ALPHAMASK 26 | float alpha = texture2D(sDiffMap, vTexCoord.xy).a; 27 | if (alpha < 0.5) 28 | discard; 29 | #endif 30 | 31 | #ifdef VSM_SHADOW 32 | float depth = vTexCoord.z / vTexCoord.w * 0.5 + 0.5; 33 | gl_FragColor = vec4(depth, depth * depth, 1.0, 1.0); 34 | #else 35 | gl_FragColor = vec4(1.0); 36 | #endif 37 | } 38 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/ShadowBlur.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | 6 | #ifdef COMPILEPS 7 | uniform vec2 cBlurOffsets; 8 | #endif 9 | 10 | varying vec2 vScreenPos; 11 | 12 | void VS() 13 | { 14 | mat4 modelMatrix = iModelMatrix; 15 | vec3 worldPos = GetWorldPos(modelMatrix); 16 | gl_Position = GetClipPos(worldPos); 17 | vScreenPos = GetScreenPosPreDiv(gl_Position); 18 | } 19 | 20 | void PS() 21 | { 22 | vec2 color = vec2(0.0); 23 | 24 | color += 0.015625 * texture2D(sDiffMap, vScreenPos + vec2(-3.0) * cBlurOffsets).rg; 25 | color += 0.09375 * texture2D(sDiffMap, vScreenPos + vec2(-2.0) * cBlurOffsets).rg; 26 | color += 0.234375 * texture2D(sDiffMap, vScreenPos + vec2(-1.0) * cBlurOffsets).rg; 27 | color += 0.3125 * texture2D(sDiffMap, vScreenPos).rg; 28 | color += 0.234375 * texture2D(sDiffMap, vScreenPos + vec2(1.0) * cBlurOffsets).rg; 29 | color += 0.09375 * texture2D(sDiffMap, vScreenPos + vec2(2.0) * cBlurOffsets).rg; 30 | color += 0.015625 * texture2D(sDiffMap, vScreenPos + vec2(3.0) * cBlurOffsets).rg; 31 | 32 | gl_FragColor = vec4(color, 0.0, 0.0); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Skybox.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | 5 | varying vec3 vTexCoord; 6 | 7 | void VS() 8 | { 9 | mat4 modelMatrix = iModelMatrix; 10 | vec3 worldPos = GetWorldPos(modelMatrix); 11 | gl_Position = GetClipPos(worldPos); 12 | gl_Position.z = gl_Position.w; 13 | vTexCoord = iPos.xyz; 14 | } 15 | 16 | void PS() 17 | { 18 | vec4 sky = cMatDiffColor * textureCube(sDiffCubeMap, vTexCoord); 19 | #ifdef HDRSCALE 20 | sky = pow(sky + clamp((cAmbientColor.a - 1.0) * 0.1, 0.0, 0.25), max(vec4(cAmbientColor.a), 1.0)) * clamp(cAmbientColor.a, 0.0, 1.0); 21 | #endif 22 | gl_FragColor = sky; 23 | } 24 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Skydome.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | 5 | varying vec2 vTexCoord; 6 | 7 | void VS() 8 | { 9 | mat4 modelMatrix = iModelMatrix; 10 | vec3 worldPos = GetWorldPos(modelMatrix); 11 | gl_Position = GetClipPos(worldPos); 12 | gl_Position.z = gl_Position.w; 13 | vTexCoord = iTexCoord.xy; 14 | } 15 | 16 | void PS() 17 | { 18 | gl_FragColor = texture2D(sDiffMap, vTexCoord); 19 | } 20 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Stencil.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Transform.glsl" 3 | 4 | void VS() 5 | { 6 | mat4 modelMatrix = iModelMatrix; 7 | vec3 worldPos = GetWorldPos(modelMatrix); 8 | gl_Position = GetClipPos(worldPos); 9 | } 10 | 11 | void PS() 12 | { 13 | gl_FragColor = vec4(1.0); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Tonemap.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | #include "PostProcess.glsl" 6 | 7 | varying vec2 vScreenPos; 8 | 9 | #ifdef COMPILEPS 10 | uniform float cTonemapExposureBias; 11 | uniform float cTonemapMaxWhite; 12 | #endif 13 | 14 | void VS() 15 | { 16 | mat4 modelMatrix = iModelMatrix; 17 | vec3 worldPos = GetWorldPos(modelMatrix); 18 | gl_Position = GetClipPos(worldPos); 19 | vScreenPos = GetScreenPosPreDiv(gl_Position); 20 | } 21 | 22 | void PS() 23 | { 24 | #ifdef REINHARDEQ3 25 | vec3 color = ReinhardEq3Tonemap(max(texture2D(sDiffMap, vScreenPos).rgb * cTonemapExposureBias, 0.0)); 26 | gl_FragColor = vec4(color, 1.0); 27 | #endif 28 | 29 | #ifdef REINHARDEQ4 30 | vec3 color = ReinhardEq4Tonemap(max(texture2D(sDiffMap, vScreenPos).rgb * cTonemapExposureBias, 0.0), cTonemapMaxWhite); 31 | gl_FragColor = vec4(color, 1.0); 32 | #endif 33 | 34 | #ifdef UNCHARTED2 35 | vec3 color = Uncharted2Tonemap(max(texture2D(sDiffMap, vScreenPos).rgb * cTonemapExposureBias, 0.0)) / 36 | Uncharted2Tonemap(vec3(cTonemapMaxWhite, cTonemapMaxWhite, cTonemapMaxWhite)); 37 | gl_FragColor = vec4(color, 1.0); 38 | #endif 39 | } 40 | 41 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Unlit.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | #include "ScreenPos.glsl" 5 | #include "Fog.glsl" 6 | 7 | varying vec2 vTexCoord; 8 | varying vec4 vWorldPos; 9 | #ifdef VERTEXCOLOR 10 | varying vec4 vColor; 11 | #endif 12 | 13 | void VS() 14 | { 15 | mat4 modelMatrix = iModelMatrix; 16 | vec3 worldPos = GetWorldPos(modelMatrix); 17 | gl_Position = GetClipPos(worldPos); 18 | vTexCoord = GetTexCoord(iTexCoord); 19 | vWorldPos = vec4(worldPos, GetDepth(gl_Position)); 20 | 21 | #ifdef VERTEXCOLOR 22 | vColor = iColor; 23 | #endif 24 | 25 | } 26 | 27 | void PS() 28 | { 29 | // Get material diffuse albedo 30 | #ifdef DIFFMAP 31 | vec4 diffColor = cMatDiffColor * texture2D(sDiffMap, vTexCoord); 32 | #ifdef ALPHAMASK 33 | if (diffColor.a < 0.5) 34 | discard; 35 | #endif 36 | #else 37 | vec4 diffColor = cMatDiffColor; 38 | #endif 39 | 40 | #ifdef VERTEXCOLOR 41 | diffColor *= vColor; 42 | #endif 43 | 44 | // Get fog factor 45 | #ifdef HEIGHTFOG 46 | float fogFactor = GetHeightFogFactor(vWorldPos.w, vWorldPos.y); 47 | #else 48 | float fogFactor = GetFogFactor(vWorldPos.w); 49 | #endif 50 | 51 | #if defined(PREPASS) 52 | // Fill light pre-pass G-Buffer 53 | gl_FragData[0] = vec4(0.5, 0.5, 0.5, 1.0); 54 | gl_FragData[1] = vec4(EncodeDepth(vWorldPos.w), 0.0); 55 | #elif defined(DEFERRED) 56 | gl_FragData[0] = vec4(GetFog(diffColor.rgb, fogFactor), diffColor.a); 57 | gl_FragData[1] = vec4(0.0, 0.0, 0.0, 0.0); 58 | gl_FragData[2] = vec4(0.5, 0.5, 0.5, 1.0); 59 | gl_FragData[3] = vec4(EncodeDepth(vWorldPos.w), 0.0); 60 | #else 61 | gl_FragColor = vec4(GetFog(diffColor.rgb, fogFactor), diffColor.a); 62 | #endif 63 | } 64 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/Urho2D.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Samplers.glsl" 3 | #include "Transform.glsl" 4 | 5 | varying vec2 vTexCoord; 6 | varying vec4 vColor; 7 | 8 | void VS() 9 | { 10 | mat4 modelMatrix = iModelMatrix; 11 | vec3 worldPos = GetWorldPos(modelMatrix); 12 | gl_Position = GetClipPos(worldPos); 13 | 14 | vTexCoord = iTexCoord; 15 | vColor = iColor; 16 | } 17 | 18 | void PS() 19 | { 20 | vec4 diffColor = cMatDiffColor * vColor; 21 | vec4 diffInput = texture2D(sDiffMap, vTexCoord); 22 | gl_FragColor = diffColor * diffInput; 23 | } 24 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/VegetationDepth.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Transform.glsl" 3 | 4 | uniform float cWindHeightFactor; 5 | uniform float cWindHeightPivot; 6 | uniform float cWindPeriod; 7 | uniform vec2 cWindWorldSpacing; 8 | 9 | varying vec3 vTexCoord; 10 | 11 | void VS() 12 | { 13 | mat4 modelMatrix = iModelMatrix; 14 | vec3 worldPos = GetWorldPos(modelMatrix); 15 | 16 | float windStrength = max(iPos.y - cWindHeightPivot, 0.0) * cWindHeightFactor; 17 | float windPeriod = cElapsedTime * cWindPeriod + dot(worldPos.xz, cWindWorldSpacing); 18 | worldPos.x += windStrength * sin(windPeriod); 19 | worldPos.z -= windStrength * cos(windPeriod); 20 | 21 | gl_Position = GetClipPos(worldPos); 22 | vTexCoord = vec3(GetTexCoord(iTexCoord), GetDepth(gl_Position)); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /res/coreData/Shaders/GLSL/VegetationShadow.glsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.glsl" 2 | #include "Transform.glsl" 3 | 4 | uniform float cWindHeightFactor; 5 | uniform float cWindHeightPivot; 6 | uniform float cWindPeriod; 7 | uniform vec2 cWindWorldSpacing; 8 | 9 | varying vec2 vTexCoord; 10 | 11 | void VS() 12 | { 13 | mat4 modelMatrix = iModelMatrix; 14 | vec3 worldPos = GetWorldPos(modelMatrix); 15 | 16 | float windStrength = max(iPos.y - cWindHeightPivot, 0.0) * cWindHeightFactor; 17 | float windPeriod = cElapsedTime * cWindPeriod + dot(worldPos.xz, cWindWorldSpacing); 18 | worldPos.x += windStrength * sin(windPeriod); 19 | worldPos.z -= windStrength * cos(windPeriod); 20 | 21 | gl_Position = GetClipPos(worldPos); 22 | vTexCoord = GetTexCoord(iTexCoord); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Blur.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Transform.hlsl" 3 | #include "Samplers.hlsl" 4 | #include "ScreenPos.hlsl" 5 | #include "PostProcess.hlsl" 6 | 7 | uniform float2 cBlurDir; 8 | uniform float cBlurRadius; 9 | uniform float cBlurSigma; 10 | uniform float2 cBlurHOffsets; 11 | uniform float2 cBlurHInvSize; 12 | 13 | void VS(float4 iPos : POSITION, 14 | out float2 oTexCoord : TEXCOORD0, 15 | out float2 oScreenPos : TEXCOORD1, 16 | out float4 oPos : OUTPOSITION) 17 | { 18 | float4x3 modelMatrix = iModelMatrix; 19 | float3 worldPos = GetWorldPos(modelMatrix); 20 | oPos = GetClipPos(worldPos); 21 | oTexCoord = GetQuadTexCoord(oPos) + cBlurHOffsets; 22 | oScreenPos = GetScreenPosPreDiv(oPos); 23 | } 24 | 25 | void PS(float2 iTexCoord : TEXCOORD0, 26 | float2 iScreenPos : TEXCOORD1, 27 | out float4 oColor : OUTCOLOR0) 28 | { 29 | #ifdef BLUR3 30 | #ifndef D3D11 31 | oColor = GaussianBlur(3, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, iTexCoord); 32 | #else 33 | oColor = GaussianBlur(3, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, tDiffMap, sDiffMap, iTexCoord); 34 | #endif 35 | #endif 36 | 37 | #ifdef BLUR5 38 | #ifndef D3D11 39 | oColor = GaussianBlur(5, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, iTexCoord); 40 | #else 41 | oColor = GaussianBlur(5, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, tDiffMap, sDiffMap, iTexCoord); 42 | #endif 43 | #endif 44 | 45 | #ifdef BLUR7 46 | #ifndef D3D11 47 | oColor = GaussianBlur(7, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, iTexCoord); 48 | #else 49 | oColor = GaussianBlur(7, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, tDiffMap, sDiffMap, iTexCoord); 50 | #endif 51 | #endif 52 | 53 | #ifdef BLUR9 54 | #ifndef D3D11 55 | oColor = GaussianBlur(9, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, sDiffMap, iTexCoord); 56 | #else 57 | oColor = GaussianBlur(9, cBlurDir, cBlurHInvSize * cBlurRadius, cBlurSigma, tDiffMap, sDiffMap, iTexCoord); 58 | #endif 59 | #endif 60 | } 61 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/ClearFramebuffer.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | #include "ScreenPos.hlsl" 5 | 6 | void VS(float4 iPos : POSITION, 7 | out float4 oPos : OUTPOSITION) 8 | { 9 | float4x3 modelMatrix = iModelMatrix; 10 | float3 worldPos = GetWorldPos(modelMatrix); 11 | oPos = GetClipPos(worldPos); 12 | } 13 | 14 | void PS(out float4 oColor : OUTCOLOR0) 15 | { 16 | oColor = cMatDiffColor; 17 | } 18 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/ColorCorrection.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Transform.hlsl" 3 | #include "Samplers.hlsl" 4 | #include "ScreenPos.hlsl" 5 | #include "PostProcess.hlsl" 6 | 7 | void VS(float4 iPos : POSITION, 8 | out float2 oScreenPos : TEXCOORD0, 9 | out float4 oPos : OUTPOSITION) 10 | { 11 | float4x3 modelMatrix = iModelMatrix; 12 | float3 worldPos = GetWorldPos(modelMatrix); 13 | oPos = GetClipPos(worldPos); 14 | oScreenPos = GetScreenPosPreDiv(oPos); 15 | } 16 | 17 | void PS(float2 iScreenPos : TEXCOORD0, 18 | out float4 oColor : OUTCOLOR0) 19 | { 20 | float3 color = Sample2D(DiffMap, iScreenPos).rgb; 21 | #ifndef D3D11 22 | oColor = float4(ColorCorrection(color, sVolumeMap), 1.0); 23 | #else 24 | oColor = float4(ColorCorrection(color, tVolumeMap, sVolumeMap), 1.0); 25 | #endif 26 | } 27 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Constants.hlsl: -------------------------------------------------------------------------------- 1 | #define M_PI 3.14159265358979323846 2 | #define M_EPSILON 0.0001 3 | 4 | #ifdef PBR 5 | #define ROUGHNESS_FLOOR 0.003 6 | #define METALNESS_FLOOR 0.03 7 | #endif 8 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/CopyFramebuffer.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | #include "ScreenPos.hlsl" 5 | 6 | void VS(float4 iPos : POSITION, 7 | out float2 oScreenPos : TEXCOORD0, 8 | out float4 oPos : OUTPOSITION) 9 | { 10 | float4x3 modelMatrix = iModelMatrix; 11 | float3 worldPos = GetWorldPos(modelMatrix); 12 | oPos = GetClipPos(worldPos); 13 | oScreenPos = GetScreenPosPreDiv(oPos); 14 | } 15 | 16 | void PS(float2 iScreenPos : TEXCOORD0, 17 | out float4 oColor : OUTCOLOR0) 18 | { 19 | oColor = Sample2D(DiffMap, iScreenPos); 20 | } 21 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Depth.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | void VS(float4 iPos : POSITION, 6 | #ifdef SKINNED 7 | float4 iBlendWeights : BLENDWEIGHT, 8 | int4 iBlendIndices : BLENDINDICES, 9 | #endif 10 | #ifdef INSTANCED 11 | float4x3 iModelInstance : TEXCOORD4, 12 | #endif 13 | #ifndef NOUV 14 | float2 iTexCoord : TEXCOORD0, 15 | #endif 16 | out float3 oTexCoord : TEXCOORD0, 17 | out float4 oPos : OUTPOSITION) 18 | { 19 | // Define a 0,0 UV coord if not expected from the vertex data 20 | #ifdef NOUV 21 | float2 iTexCoord = float2(0.0, 0.0); 22 | #endif 23 | 24 | float4x3 modelMatrix = iModelMatrix; 25 | float3 worldPos = GetWorldPos(modelMatrix); 26 | oPos = GetClipPos(worldPos); 27 | oTexCoord = float3(GetTexCoord(iTexCoord), GetDepth(oPos)); 28 | } 29 | 30 | void PS( 31 | float3 iTexCoord : TEXCOORD0, 32 | out float4 oColor : OUTCOLOR0) 33 | { 34 | #ifdef ALPHAMASK 35 | float alpha = Sample2D(DiffMap, iTexCoord.xy).a; 36 | if (alpha < 0.5) 37 | discard; 38 | #endif 39 | 40 | oColor = iTexCoord.z; 41 | } 42 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Fog.hlsl: -------------------------------------------------------------------------------- 1 | #ifdef COMPILEPS 2 | float3 GetFog(float3 color, float fogFactor) 3 | { 4 | return lerp(cFogColor, color, fogFactor); 5 | } 6 | 7 | float3 GetLitFog(float3 color, float fogFactor) 8 | { 9 | return color * fogFactor; 10 | } 11 | 12 | float GetFogFactor(float depth) 13 | { 14 | return saturate((cFogParams.x - depth) * cFogParams.y); 15 | } 16 | 17 | float GetHeightFogFactor(float depth, float height) 18 | { 19 | float fogFactor = GetFogFactor(depth); 20 | float heightFogFactor = (height - cFogParams.z) * cFogParams.w; 21 | heightFogFactor = 1.0 - saturate(exp(-(heightFogFactor * heightFogFactor))); 22 | return min(heightFogFactor, fogFactor); 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/GammaCorrection.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Transform.hlsl" 3 | #include "Samplers.hlsl" 4 | #include "ScreenPos.hlsl" 5 | #include "PostProcess.hlsl" 6 | 7 | void VS(float4 iPos : POSITION, 8 | out float2 oScreenPos : TEXCOORD0, 9 | out float4 oPos : OUTPOSITION) 10 | { 11 | float4x3 modelMatrix = iModelMatrix; 12 | float3 worldPos = GetWorldPos(modelMatrix); 13 | oPos = GetClipPos(worldPos); 14 | oScreenPos = GetScreenPosPreDiv(oPos); 15 | } 16 | 17 | void PS(float2 iScreenPos : TEXCOORD0, 18 | out float4 oColor : OUTCOLOR0) 19 | { 20 | float3 color = Sample2D(DiffMap, iScreenPos).rgb; 21 | oColor = float4(ToInverseGamma(color), 1.0); 22 | } 23 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/GreyScale.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | #include "ScreenPos.hlsl" 5 | #include "Lighting.hlsl" 6 | 7 | void VS(float4 iPos : POSITION, 8 | out float2 oScreenPos : TEXCOORD0, 9 | out float4 oPos : OUTPOSITION) 10 | { 11 | float4x3 modelMatrix = iModelMatrix; 12 | float3 worldPos = GetWorldPos(modelMatrix); 13 | oPos = GetClipPos(worldPos); 14 | oScreenPos = GetScreenPosPreDiv(oPos); 15 | } 16 | 17 | void PS(float2 iScreenPos : TEXCOORD0, 18 | out float4 oColor : OUTCOLOR0) 19 | { 20 | float3 rgb = Sample2D(DiffMap, iScreenPos).rgb; 21 | float intensity = GetIntensity(rgb); 22 | oColor = float4(intensity, intensity, intensity, 1.0); 23 | } 24 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/ScreenPos.hlsl: -------------------------------------------------------------------------------- 1 | #ifdef COMPILEVS 2 | float3x3 GetCameraRot() 3 | { 4 | return float3x3(cViewInv[0][0], cViewInv[0][1], cViewInv[0][2], 5 | cViewInv[1][0], cViewInv[1][1], cViewInv[1][2], 6 | cViewInv[2][0], cViewInv[2][1], cViewInv[2][2]); 7 | } 8 | 9 | float4 GetScreenPos(float4 clipPos) 10 | { 11 | return float4( 12 | clipPos.x * cGBufferOffsets.z + cGBufferOffsets.x * clipPos.w, 13 | -clipPos.y * cGBufferOffsets.w + cGBufferOffsets.y * clipPos.w, 14 | 0.0, 15 | clipPos.w); 16 | } 17 | 18 | float2 GetScreenPosPreDiv(float4 clipPos) 19 | { 20 | return float2( 21 | clipPos.x / clipPos.w * cGBufferOffsets.z + cGBufferOffsets.x, 22 | -clipPos.y / clipPos.w * cGBufferOffsets.w + cGBufferOffsets.y); 23 | } 24 | 25 | float2 GetQuadTexCoord(float4 clipPos) 26 | { 27 | return float2( 28 | clipPos.x / clipPos.w * 0.5 + 0.5, 29 | -clipPos.y / clipPos.w * 0.5 + 0.5); 30 | } 31 | 32 | float2 GetQuadTexCoordNoFlip(float3 worldPos) 33 | { 34 | return float2( 35 | worldPos.x * 0.5 + 0.5, 36 | -worldPos.y * 0.5 + 0.5); 37 | } 38 | 39 | float3 GetFarRay(float4 clipPos) 40 | { 41 | float3 viewRay = float3( 42 | clipPos.x / clipPos.w * cFrustumSize.x, 43 | clipPos.y / clipPos.w * cFrustumSize.y, 44 | cFrustumSize.z); 45 | 46 | return mul(viewRay, GetCameraRot()); 47 | } 48 | 49 | float3 GetNearRay(float4 clipPos) 50 | { 51 | float3 viewRay = float3( 52 | clipPos.x / clipPos.w * cFrustumSize.x, 53 | clipPos.y / clipPos.w * cFrustumSize.y, 54 | 0.0); 55 | 56 | return mul(viewRay, GetCameraRot()) * cDepthMode.z; 57 | } 58 | #endif 59 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Shadow.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | void VS(float4 iPos : POSITION, 6 | #ifndef NOUV 7 | float2 iTexCoord : TEXCOORD0, 8 | #endif 9 | #ifdef SKINNED 10 | float4 iBlendWeights : BLENDWEIGHT, 11 | int4 iBlendIndices : BLENDINDICES, 12 | #endif 13 | #ifdef INSTANCED 14 | float4x3 iModelInstance : TEXCOORD4, 15 | #endif 16 | #if defined(BILLBOARD) || defined(DIRBILLBOARD) 17 | float2 iSize : TEXCOORD1, 18 | #endif 19 | #ifdef VSM_SHADOW 20 | out float4 oTexCoord : TEXCOORD0, 21 | #else 22 | out float2 oTexCoord : TEXCOORD0, 23 | #endif 24 | out float4 oPos : OUTPOSITION) 25 | { 26 | // Define a 0,0 UV coord if not expected from the vertex data 27 | #ifdef NOUV 28 | float2 iTexCoord = float2(0.0, 0.0); 29 | #endif 30 | 31 | float4x3 modelMatrix = iModelMatrix; 32 | float3 worldPos = GetWorldPos(modelMatrix); 33 | oPos = GetClipPos(worldPos); 34 | #ifdef VSM_SHADOW 35 | oTexCoord = float4(GetTexCoord(iTexCoord), oPos.z, oPos.w); 36 | #else 37 | oTexCoord = GetTexCoord(iTexCoord); 38 | #endif 39 | } 40 | 41 | void PS( 42 | #ifdef VSM_SHADOW 43 | float4 iTexCoord : TEXCOORD0, 44 | #else 45 | float2 iTexCoord : TEXCOORD0, 46 | #endif 47 | out float4 oColor : OUTCOLOR0) 48 | { 49 | #ifdef ALPHAMASK 50 | float alpha = Sample2D(DiffMap, iTexCoord.xy).a; 51 | if (alpha < 0.5) 52 | discard; 53 | #endif 54 | 55 | #ifdef VSM_SHADOW 56 | float depth = iTexCoord.z / iTexCoord.w; 57 | oColor = float4(depth, depth * depth, 1.0, 1.0); 58 | #else 59 | oColor = 1.0; 60 | #endif 61 | } 62 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/ShadowBlur.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | #include "ScreenPos.hlsl" 5 | 6 | #ifndef D3D11 7 | 8 | // D3D9 uniforms 9 | uniform float2 cBlurOffsets; 10 | 11 | #else 12 | 13 | #ifdef COMPILEPS 14 | // D3D11 constant buffers 15 | cbuffer CustomPS : register(b6) 16 | { 17 | float2 cBlurOffsets; 18 | } 19 | #endif 20 | 21 | #endif 22 | 23 | void VS(float4 iPos : POSITION, 24 | out float2 oScreenPos : TEXCOORD0, 25 | out float4 oPos : OUTPOSITION) 26 | { 27 | float4x3 modelMatrix = iModelMatrix; 28 | float3 worldPos = GetWorldPos(modelMatrix); 29 | oPos = GetClipPos(worldPos); 30 | oScreenPos = GetScreenPosPreDiv(oPos); 31 | } 32 | 33 | void PS(float2 iScreenPos : TEXCOORD0, 34 | out float4 oColor : OUTCOLOR0) 35 | { 36 | float2 color = 0.0; 37 | 38 | color += 0.015625 * Sample2D(DiffMap, iScreenPos - 3.0 * cBlurOffsets).rg; 39 | color += 0.09375 * Sample2D(DiffMap, iScreenPos - 2.0 * cBlurOffsets).rg; 40 | color += 0.234375 * Sample2D(DiffMap, iScreenPos - cBlurOffsets).rg; 41 | color += 0.3125 * Sample2D(DiffMap, iScreenPos).rg; 42 | color += 0.234375 * Sample2D(DiffMap, iScreenPos + cBlurOffsets).rg; 43 | color += 0.09375 * Sample2D(DiffMap, iScreenPos + 2.0 * cBlurOffsets).rg; 44 | color += 0.015625 * Sample2D(DiffMap, iScreenPos + 3.0 * cBlurOffsets).rg; 45 | 46 | oColor = float4(color, 0.0, 0.0); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Skybox.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | void VS(float4 iPos : POSITION, 6 | #ifdef INSTANCED 7 | float4x3 iModelInstance : TEXCOORD4, 8 | #endif 9 | out float3 oTexCoord : TEXCOORD0, 10 | out float4 oPos : OUTPOSITION) 11 | { 12 | float4x3 modelMatrix = iModelMatrix; 13 | float3 worldPos = GetWorldPos(modelMatrix); 14 | oPos = GetClipPos(worldPos); 15 | 16 | oPos.z = oPos.w; 17 | oTexCoord = iPos.xyz; 18 | } 19 | 20 | void PS(float3 iTexCoord : TEXCOORD0, 21 | out float4 oColor : OUTCOLOR0) 22 | { 23 | float4 sky = cMatDiffColor * SampleCube(DiffCubeMap, iTexCoord); 24 | #ifdef HDRSCALE 25 | sky = pow(sky + clamp((cAmbientColor.a - 1.0) * 0.1, 0.0, 0.25), max(cAmbientColor.a, 1.0)) * clamp(cAmbientColor.a, 0.0, 1.0); 26 | #endif 27 | oColor = sky; 28 | } 29 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Skydome.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | void VS(float4 iPos : POSITION, 6 | float2 iTexCoord: TEXCOORD0, 7 | out float2 oTexCoord : TEXCOORD0, 8 | out float4 oPos : OUTPOSITION) 9 | { 10 | float4x3 modelMatrix = iModelMatrix; 11 | float3 worldPos = GetWorldPos(modelMatrix); 12 | oPos = GetClipPos(worldPos); 13 | 14 | oPos.z = oPos.w; 15 | oTexCoord = iTexCoord; 16 | } 17 | 18 | void PS(float2 iTexCoord : TEXCOORD0, 19 | out float4 oColor : OUTCOLOR0) 20 | { 21 | oColor = cMatDiffColor * Sample2D(DiffMap, iTexCoord); 22 | } 23 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Stencil.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Transform.hlsl" 3 | 4 | void VS(float4 iPos : POSITION, 5 | out float4 oPos : OUTPOSITION) 6 | { 7 | float4x3 modelMatrix = iModelMatrix; 8 | float3 worldPos = GetWorldPos(modelMatrix); 9 | oPos = GetClipPos(worldPos); 10 | } 11 | 12 | void PS(out float4 oColor : OUTCOLOR0) 13 | { 14 | oColor = 1.0; 15 | } 16 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Tonemap.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Transform.hlsl" 3 | #include "Samplers.hlsl" 4 | #include "ScreenPos.hlsl" 5 | #include "PostProcess.hlsl" 6 | 7 | #ifndef D3D11 8 | 9 | // D3D9 uniforms 10 | uniform float cTonemapExposureBias; 11 | uniform float cTonemapMaxWhite; 12 | 13 | #else 14 | 15 | #ifdef COMPILEPS 16 | // D3D11 constant buffers 17 | cbuffer CustomPS : register(b6) 18 | { 19 | float cTonemapExposureBias; 20 | float cTonemapMaxWhite; 21 | } 22 | #endif 23 | 24 | #endif 25 | 26 | void VS(float4 iPos : POSITION, 27 | out float2 oScreenPos : TEXCOORD0, 28 | out float4 oPos : OUTPOSITION) 29 | { 30 | float4x3 modelMatrix = iModelMatrix; 31 | float3 worldPos = GetWorldPos(modelMatrix); 32 | oPos = GetClipPos(worldPos); 33 | oScreenPos = GetScreenPosPreDiv(oPos); 34 | } 35 | 36 | void PS(float2 iScreenPos : TEXCOORD0, 37 | out float4 oColor : OUTCOLOR0) 38 | { 39 | #ifdef REINHARDEQ3 40 | float3 color = ReinhardEq3Tonemap(max(Sample2D(DiffMap, iScreenPos).rgb * cTonemapExposureBias, 0.0)); 41 | oColor = float4(color, 1.0); 42 | #endif 43 | 44 | #ifdef REINHARDEQ4 45 | float3 color = ReinhardEq4Tonemap(max(Sample2D(DiffMap, iScreenPos).rgb * cTonemapExposureBias, 0.0), cTonemapMaxWhite); 46 | oColor = float4(color, 1.0); 47 | #endif 48 | 49 | #ifdef UNCHARTED2 50 | float3 color = Uncharted2Tonemap(max(Sample2D(DiffMap, iScreenPos).rgb * cTonemapExposureBias, 0.0)) / 51 | Uncharted2Tonemap(float3(cTonemapMaxWhite, cTonemapMaxWhite, cTonemapMaxWhite)); 52 | oColor = float4(color, 1.0); 53 | #endif 54 | } 55 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/Urho2D.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | void VS(float4 iPos : POSITION, 6 | float2 iTexCoord : TEXCOORD0, 7 | float4 iColor : COLOR0, 8 | out float4 oColor : COLOR0, 9 | out float2 oTexCoord : TEXCOORD0, 10 | out float4 oPos : OUTPOSITION) 11 | { 12 | float4x3 modelMatrix = iModelMatrix; 13 | float3 worldPos = GetWorldPos(modelMatrix); 14 | oPos = GetClipPos(worldPos); 15 | 16 | oColor = iColor; 17 | oTexCoord = iTexCoord; 18 | } 19 | 20 | void PS(float4 iColor : COLOR0, 21 | float2 iTexCoord : TEXCOORD0, 22 | out float4 oColor : OUTCOLOR0) 23 | { 24 | float4 diffColor = cMatDiffColor * iColor; 25 | float4 diffInput = Sample2D(DiffMap, iTexCoord); 26 | oColor = diffColor * diffInput; 27 | } 28 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/VegetationDepth.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | #ifndef D3D11 6 | 7 | // D3D9 uniforms 8 | uniform float cWindHeightFactor; 9 | uniform float cWindHeightPivot; 10 | uniform float cWindPeriod; 11 | uniform float2 cWindWorldSpacing; 12 | 13 | #else 14 | 15 | // D3D11 constant buffer 16 | cbuffer CustomVS : register(b6) 17 | { 18 | float cWindHeightFactor; 19 | float cWindHeightPivot; 20 | float cWindPeriod; 21 | float2 cWindWorldSpacing; 22 | } 23 | 24 | #endif 25 | 26 | void VS(float4 iPos : POSITION, 27 | #ifdef SKINNED 28 | float4 iBlendWeights : BLENDWEIGHT, 29 | int4 iBlendIndices : BLENDINDICES, 30 | #endif 31 | #ifdef INSTANCED 32 | float4x3 iModelInstance : TEXCOORD4, 33 | #endif 34 | float2 iTexCoord : TEXCOORD0, 35 | out float3 oTexCoord : TEXCOORD0, 36 | out float4 oPos : OUTPOSITION) 37 | { 38 | float4x3 modelMatrix = iModelMatrix; 39 | float3 worldPos = GetWorldPos(modelMatrix); 40 | 41 | float windStrength = max(iPos.y - cWindHeightPivot, 0.0) * cWindHeightFactor; 42 | float windPeriod = cElapsedTime * cWindPeriod + dot(worldPos.xz, cWindWorldSpacing); 43 | worldPos.x += windStrength * sin(windPeriod); 44 | worldPos.z -= windStrength * cos(windPeriod); 45 | 46 | oPos = GetClipPos(worldPos); 47 | oTexCoord = float3(GetTexCoord(iTexCoord), GetDepth(oPos)); 48 | } 49 | -------------------------------------------------------------------------------- /res/coreData/Shaders/HLSL/VegetationShadow.hlsl: -------------------------------------------------------------------------------- 1 | #include "Uniforms.hlsl" 2 | #include "Samplers.hlsl" 3 | #include "Transform.hlsl" 4 | 5 | #ifndef D3D11 6 | 7 | // D3D9 uniforms 8 | uniform float cWindHeightFactor; 9 | uniform float cWindHeightPivot; 10 | uniform float cWindPeriod; 11 | uniform float2 cWindWorldSpacing; 12 | 13 | #else 14 | 15 | // D3D11 constant buffer 16 | cbuffer CustomVS : register(b6) 17 | { 18 | float cWindHeightFactor; 19 | float cWindHeightPivot; 20 | float cWindPeriod; 21 | float2 cWindWorldSpacing; 22 | } 23 | 24 | #endif 25 | 26 | void VS(float4 iPos : POSITION, 27 | #ifdef SKINNED 28 | float4 iBlendWeights : BLENDWEIGHT, 29 | int4 iBlendIndices : BLENDINDICES, 30 | #endif 31 | #ifdef INSTANCED 32 | float4x3 iModelInstance : TEXCOORD4, 33 | #endif 34 | float2 iTexCoord : TEXCOORD0, 35 | out float2 oTexCoord : TEXCOORD0, 36 | out float4 oPos : OUTPOSITION) 37 | { 38 | float4x3 modelMatrix = iModelMatrix; 39 | float3 worldPos = GetWorldPos(modelMatrix); 40 | 41 | float windStrength = max(iPos.y - cWindHeightPivot, 0.0) * cWindHeightFactor; 42 | float windPeriod = cElapsedTime * cWindPeriod + dot(worldPos.xz, cWindWorldSpacing); 43 | worldPos.x += windStrength * sin(windPeriod); 44 | worldPos.z -= windStrength * cos(windPeriod); 45 | 46 | oPos = GetClipPos(worldPos); 47 | oTexCoord = GetTexCoord(iTexCoord); 48 | } 49 | -------------------------------------------------------------------------------- /res/coreData/Techniques/BasicVColUnlitAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/Diff.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAOAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAdd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAddAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffAlphaTranslucent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffEnvCube.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffEnvCubeAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffEnvCubeAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffEnvCubeAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffLightMap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffLightMapAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffLitParticleAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffLitParticleAlphaSoft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffLitParticleAlphaSoftExpand.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffMultiply.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalAOAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalAlphaTranslucent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalEnvCube.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalEnvCubeAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPacked.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedAOAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedEnvCube.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedEnvCubeAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecAOAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalPackedSpecEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecAOAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffNormalSpecEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffOverlay.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSkybox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSkyboxHDRScale.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSkydome.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSkyplane.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSpecAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffSpecAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitParticleAdd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitParticleAddSoft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitParticleAddSoftExpand.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitParticleAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitParticleAlphaSoft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffUnlitParticleAlphaSoftExpand.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffVCol.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffVColAdd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffVColAddAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffVColMultiply.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/DiffVColUnlitAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTexture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureAdd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureAddAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureEnvCube.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureEnvCubeAO.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureEnvCubeAOAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureEnvCubeAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureMultiply.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureNormal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureNormalAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureNormalPacked.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureNormalPackedAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureOverlay.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureUnlit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureUnlitAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureUnlitVCol.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureVCol.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureVColAdd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureVColAddAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/NoTextureVColMultiply.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/DiffNormalSpecEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | > 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/DiffNormalSpecEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRDiff.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRDiffAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRDiffNormal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRDiffNormalAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRDiffNormalEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRDiffNormalEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRMetallicRoughDiffNormalSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRMetallicRoughDiffNormalSpecEmissive.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRMetallicRoughDiffNormalSpecEmissiveAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRMetallicRoughDiffSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRMetallicRoughDiffSpecAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRNoTexture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /res/coreData/Techniques/PBR/PBRNoTextureAlpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Techniques/TerrainBlend.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/VegetationDiff.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/VegetationDiffAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/coreData/Techniques/VegetationDiffUnlit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/VegetationDiffUnlitAlphaMask.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Techniques/Water.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /res/coreData/Textures/LUTIdentity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/coreData/Textures/LUTIdentity.png -------------------------------------------------------------------------------- /res/coreData/Textures/LUTIdentity.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /res/coreData/Textures/Ramp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/coreData/Textures/Ramp.png -------------------------------------------------------------------------------- /res/coreData/Textures/Ramp.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /res/coreData/Textures/RampExtreme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/coreData/Textures/RampExtreme.png -------------------------------------------------------------------------------- /res/coreData/Textures/RampExtreme.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Textures/RampWide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/coreData/Textures/RampWide.png -------------------------------------------------------------------------------- /res/coreData/Textures/RampWide.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /res/coreData/Textures/Spot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/coreData/Textures/Spot.png -------------------------------------------------------------------------------- /res/coreData/Textures/Spot.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/coreData/Textures/SpotWide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/coreData/Textures/SpotWide.png -------------------------------------------------------------------------------- /res/coreData/Textures/SpotWide.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/data/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gogoprog/gengine/a7f26e129040a262560d6c36b96297e138ef3dfe/res/data/.empty -------------------------------------------------------------------------------- /scripts/activate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | if [[ ${SHELL} == *"/bash"* ]]; then 4 | SRC=${BASH_SOURCE} 5 | 6 | if [[ ${SRC} == "" ]] then 7 | SRC=$0 8 | fi 9 | else 10 | SRC=$0 11 | fi 12 | 13 | 14 | BIN_DIR=$(dirname $(readlink -e ${SRC})) 15 | BASEDIR=${BIN_DIR%/*} 16 | 17 | export PATH=${BASEDIR}/scripts:${PATH} 18 | export GENGINE=${BASEDIR} 19 | 20 | echo "[gengine] Enabled with ${GENGINE}" 21 | -------------------------------------------------------------------------------- /scripts/dist/gengine-compile.bat: -------------------------------------------------------------------------------- 1 | set GENGINE_DISTRIBUTED=1 2 | set GENGINE=%~dp0 3 | 4 | cd %GENGINE% 5 | python scripts/gengine-compile %1 6 | pause 7 | -------------------------------------------------------------------------------- /scripts/dist/gengine-compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GENGINE_DISTRIBUTED=1 4 | export GENGINE=$(readlink -e .) 5 | export PATH=${GENGINE}/scripts:${PATH} 6 | 7 | pushd $1 8 | 9 | ${SHELL} -c 'gengine-compile' 10 | -------------------------------------------------------------------------------- /scripts/dist/gengine-run.bat: -------------------------------------------------------------------------------- 1 | set GENGINE_DISTRIBUTED=1 2 | set GENGINE=%~dp0 3 | 4 | cd %GENGINE% 5 | python scripts/gengine-run %1 6 | pause 7 | -------------------------------------------------------------------------------- /scripts/dist/gengine-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GENGINE_DISTRIBUTED=1 4 | export GENGINE=$(readlink -e .) 5 | export PATH=${GENGINE}/scripts:${PATH} 6 | 7 | pushd $1 8 | 9 | ${SHELL} -c 'gengine-run --html5' 10 | -------------------------------------------------------------------------------- /scripts/dist/gengine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GENGINE_DISTRIBUTED=1 4 | export GENGINE=$(readlink -e .) 5 | export PATH=${GENGINE}/scripts:${PATH} 6 | 7 | ${SHELL} -i 8 | -------------------------------------------------------------------------------- /scripts/emscripten.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import platform 4 | import os 5 | import sys 6 | import argparse 7 | import multiprocessing 8 | import os.path 9 | import common 10 | 11 | def emcc(appDir, outputDir, includeEmptyData): 12 | previous_dir = os.getcwd() 13 | os.chdir(os.environ['GENGINE']+"/build") 14 | cmd = "emcc " 15 | cmd += "" if common.debugMode else "-O3" 16 | cmd += " --bind gengine" + ('d' if common.debugMode else '') + ".bc" 17 | cmd += " -o " + outputDir + "/index.html" 18 | cmd += " --preload-file " + common.rootPath + "/res/coreData@coreData" 19 | if includeEmptyData: 20 | cmd += " --preload-file " + common.rootPath + "/res/data@data " 21 | else: 22 | cmd += " --preload-file " + appDir + "/data@data " 23 | cmd += " --use-preload-plugins -s TOTAL_MEMORY=134217728 -s TOTAL_STACK=1048576" 24 | cmd += " --shell-file " + common.rootPath + "/src/shell.html" 25 | os.system(cmd) 26 | os.chdir(previous_dir) 27 | 28 | def build(appDir, outputDir): 29 | common.log("Running emcc...") 30 | current_dir = os.getcwd() 31 | os.chdir(appDir) 32 | os.system("rm -rf index.data index.html index.js index.html.mem") 33 | emcc(current_dir, outputDir, True) 34 | os.chdir(current_dir) 35 | 36 | def runServer(targetDir): 37 | os.chdir(targetDir) 38 | common.log("Running HTTP server in '" + targetDir + "'...") 39 | os.system("python -m http.server"); 40 | -------------------------------------------------------------------------------- /scripts/gengine-build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import common 4 | import os 5 | import multiprocessing 6 | 7 | common.init() 8 | common.build() 9 | -------------------------------------------------------------------------------- /scripts/gengine-compile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import common 4 | import os 5 | import multiprocessing 6 | 7 | common.init() 8 | common.compile() 9 | -------------------------------------------------------------------------------- /scripts/gengine-gen-bindings: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd ${GENGINE}/deps/common/tbing/ 4 | ./tbing ${GENGINE}/src/bindings 5 | popd 6 | -------------------------------------------------------------------------------- /scripts/gengine-gen-classes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import common 5 | import emscripten 6 | import shutil 7 | import stat 8 | 9 | common.init() 10 | 11 | 12 | className = input("Enter component name (CamelCase): ") 13 | 14 | if className == "": 15 | common.log("Cancelled.") 16 | exit() 17 | 18 | smallName = className[:1].lower() + className[1:] 19 | 20 | srcDir = common.targetDir + "src/"; 21 | 22 | fileName = srcDir + "components/" + className + ".hx" 23 | common.log("Generating " + fileName) 24 | f = open(fileName, 'w') 25 | f.write("""package components; 26 | 27 | class {className} 28 | {{ 29 | public function new() 30 | {{ 31 | }} 32 | }} 33 | """.format(**locals())) 34 | f.close() 35 | 36 | fileName = srcDir + "nodes/" + className + "Node.hx" 37 | common.log("Generating " + fileName) 38 | f = open(fileName, 'w') 39 | f.write( 40 | """package nodes; 41 | 42 | import gengine.*; 43 | import components.*; 44 | 45 | class {className}Node extends Node<{className}Node> 46 | {{ 47 | public var {smallName}:{className}; 48 | }} 49 | """.format(**locals()) 50 | ) 51 | f.close() 52 | 53 | fileName = srcDir + "systems/" + className + "System.hx" 54 | common.log("Generating " + fileName) 55 | f = open(fileName, 'w') 56 | f.write( 57 | """package systems; 58 | 59 | import ash.tools.ListIteratingSystem; 60 | 61 | import components.*; 62 | import nodes.*; 63 | import gengine.*; 64 | 65 | class {className}System extends ListIteratingSystem<{className}Node> 66 | {{ 67 | private var engine:Engine; 68 | 69 | public function new() 70 | {{ 71 | super({className}Node, updateNode, onNodeAdded, onNodeRemoved); 72 | }} 73 | 74 | public override function addToEngine(engine:Engine) 75 | {{ 76 | this.engine = engine; 77 | super.addToEngine(engine); 78 | }} 79 | 80 | private function updateNode(node:{className}Node, dt:Float):Void 81 | {{ 82 | }} 83 | 84 | private function onNodeAdded(node:{className}Node) 85 | {{ 86 | }} 87 | 88 | private function onNodeRemoved(node:{className}Node) 89 | {{ 90 | }} 91 | }} 92 | """.format(**locals()) 93 | ) 94 | f.close() 95 | -------------------------------------------------------------------------------- /scripts/gengine-gen-dist: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import common 5 | import emscripten 6 | import shutil 7 | import stat 8 | 9 | common.init() 10 | 11 | if common.distributed: 12 | common.exitWithError("Required non-distributed gengine.") 13 | 14 | common.log("Generating distributed gengine...") 15 | 16 | common.build() 17 | 18 | distDir = common.rootPath + "/dist" 19 | targetDir = distDir + "/build" 20 | shutil.rmtree(distDir, True) 21 | os.makedirs(targetDir) 22 | emscripten.build(targetDir, targetDir) 23 | shutil.copytree(common.rootPath + "/scripts", distDir + "/scripts") 24 | 25 | os.makedirs(distDir + "/deps/common/Ash-Haxe") 26 | shutil.copytree(common.rootPath + "/deps/common/Ash-Haxe/src", distDir + "/deps/common/Ash-Haxe/src") 27 | 28 | os.makedirs(distDir + "/src") 29 | shutil.copytree(common.rootPath + "/src/haxe", distDir + "/src/haxe") 30 | 31 | os.makedirs(distDir + "/src/bindings/generated/haxe") 32 | shutil.copytree(common.rootPath + "/src/bindings/generated/haxe/gengine", distDir + "/src/bindings/generated/haxe/gengine") 33 | 34 | shutil.copy2(common.rootPath + "/scripts/dist/gengine.sh", distDir) 35 | shutil.copy2(common.rootPath + "/scripts/dist/gengine-run.sh", distDir) 36 | shutil.copy2(common.rootPath + "/scripts/dist/gengine-run.bat", distDir) 37 | shutil.copy2(common.rootPath + "/scripts/dist/gengine-compile.sh", distDir) 38 | shutil.copy2(common.rootPath + "/scripts/dist/gengine-compile.bat", distDir) 39 | 40 | os.chdir(distDir) 41 | version = input("Enter version: ") 42 | fileName = "gengine-" + version + ".zip" 43 | os.system("echo " + version + " > " + distDir + "/VERSION.txt") 44 | os.system("zip -r " + fileName + " *") 45 | os.system("git tag " + version) 46 | -------------------------------------------------------------------------------- /scripts/gengine-gen-doc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd ${GENGINE}/src/doc 4 | haxe generate.hxml 5 | haxelib run dox -i /tmp/gengine-doc-output.xml --title "gengine API documentation" -D themeColor 0xF1EED9 -D website "//gengine.net" -o ../../docs 6 | popd 7 | -------------------------------------------------------------------------------- /scripts/gengine-pack: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import common 5 | import tempfile 6 | import shutil 7 | import emscripten 8 | 9 | def packHtml(): 10 | common.log("Packing in HTML5 mode...") 11 | current_dir = os.getcwd() 12 | os.system("rm -rf packed-html5/*") 13 | os.system("mkdir -p packed-html5") 14 | emscripten.emcc(common.targetDir, common.targetDir + '/packed-html5', False) 15 | os.chdir(current_dir) 16 | os.system("cp -rf " + common.targetDir + "gui packed-html5/gui") 17 | os.system("cp -rf " + common.targetDir + "generated packed-html5/generated") 18 | 19 | def packNative(): 20 | common.log("Packing in native mode...") 21 | packedDir = "packed-" + ( 'linux' if common.isLinux() else 'win' ) 22 | os.system("rm -rf " + packedDir + "/*") 23 | os.system("mkdir -p " + packedDir + "/content") 24 | os.system("mkdir -p " + packedDir + "/bin") 25 | os.system("cp -rf " + common.targetDir + "/* " + packedDir + "/content/") 26 | os.system("cp -rf " + common.binaryPath + " " + packedDir + "/bin/") 27 | os.system("cp -rf " + common.buildPath + "/*.dll " + packedDir + "/bin/") 28 | os.system("cp -rf " + common.buildPath + "/locales " + packedDir + "/bin/") 29 | startName = "start" + ( '' if common.isLinux() else '.bat' ) 30 | os.chdir(packedDir) 31 | fo = open(startName, "w") 32 | 33 | if not common.isLinux(): 34 | fo.write("cd content && ..\\bin\\gengine.exe\n") 35 | 36 | fo.close() 37 | os.system("chmod +x " + startName) 38 | 39 | common.init() 40 | common.build() 41 | 42 | if common.html5Mode: 43 | packHtml() 44 | else: 45 | packNative() 46 | -------------------------------------------------------------------------------- /scripts/gengine-run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os 4 | import common 5 | import emscripten 6 | import shutil 7 | 8 | def run(): 9 | if not common.html5Mode: 10 | common.log("Running...") 11 | os.chdir(common.targetDir) 12 | command = common.binaryPath 13 | if common.isLinux(): 14 | command = "LD_LIBRARY_PATH=" + common.rootPath + "/deps/linux/lib" + ('64' if common.isPlatform64() else '32') + " " + command 15 | os.system(command) 16 | else: 17 | if not common.distributed: 18 | emscripten.build(common.targetDir, common.targetDir) 19 | else: 20 | os.chdir(common.targetDir) 21 | shutil.copy2(common.rootPath + "/build/index.html", ".") 22 | shutil.copy2(common.rootPath + "/build/index.js", ".") 23 | shutil.copy2(common.rootPath + "/build/index.html.mem", ".") 24 | shutil.copy2(common.rootPath + "/build/index.data", ".") 25 | 26 | emscripten.runServer(common.targetDir) 27 | 28 | common.init() 29 | 30 | if not common.distributed: 31 | common.build() 32 | 33 | common.compile() 34 | 35 | run() 36 | -------------------------------------------------------------------------------- /src/application/application.cpp: -------------------------------------------------------------------------------- 1 | #include "application.h" 2 | 3 | #include "gui_system.h" 4 | #include "embindcefv8.h" 5 | #include 6 | #include 7 | 8 | #define STRING(src) \ 9 | #src 10 | 11 | using namespace Urho3D; 12 | 13 | namespace gengine 14 | { 15 | namespace application 16 | { 17 | 18 | #ifdef CEF 19 | void loadScriptFile(const char *filename, const char *additional_code) 20 | { 21 | std::ifstream in(filename); 22 | std::string contents((std::istreambuf_iterator(in)), std::istreambuf_iterator()); 23 | 24 | contents += additional_code; 25 | 26 | embindcefv8::executeJavaScript(contents.c_str()); 27 | } 28 | 29 | void preInit() 30 | { 31 | const char js_code[] = 32 | #include "application_preinit.js" 33 | 34 | loadScriptFile("generated/main.js", js_code); 35 | } 36 | 37 | void init() 38 | { 39 | const char js_code[] = 40 | #include "application_init.js" 41 | 42 | loadScriptFile("generated/main.js", js_code); 43 | } 44 | #endif 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/application/application.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "application_app.h" 4 | 5 | namespace gengine 6 | { 7 | namespace gui { class System; } 8 | namespace application 9 | { 10 | 11 | inline App & get() 12 | { 13 | return App::getInstance(); 14 | } 15 | 16 | #if CEF 17 | void loadScriptFile(const char *filename, const char *additional_code = ""); 18 | void preInit(); 19 | void init(); 20 | #endif 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/application/application_init.js: -------------------------------------------------------------------------------- 1 | STRING( 2 | 3 | var gengine; 4 | 5 | function __init() 6 | { 7 | gengine = Module.gengine; 8 | 9 | Main.start(); 10 | Main.onGuiLoaded(); 11 | 12 | function update() 13 | { 14 | gengine.runFrame(); 15 | 16 | Main.update(gengine.getTimeStep()); 17 | 18 | if(gengine.isRunning()) 19 | { 20 | setTimeout(update, 1); 21 | } 22 | } 23 | 24 | update(); 25 | } 26 | 27 | __init(); 28 | ); 29 | -------------------------------------------------------------------------------- /src/application/application_preinit.js: -------------------------------------------------------------------------------- 1 | STRING( 2 | var gengine; 3 | 4 | function __preinit() 5 | { 6 | gengine = Module.gengine; 7 | 8 | Main.init(); 9 | 10 | gengine.setup(); 11 | gengine.start(); 12 | } 13 | 14 | __preinit(); 15 | ); 16 | -------------------------------------------------------------------------------- /src/bindings/bindings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "embindcefv8.h" 4 | 5 | namespace Urho3D 6 | { 7 | class Vector2; 8 | class Vector3; 9 | class IntVector2; 10 | class Rect; 11 | class Color; 12 | class Quaternion; 13 | } 14 | 15 | EMBINDCEFV8_DECLARE_VALUE_OBJECT(Urho3D::Vector2); 16 | EMBINDCEFV8_DECLARE_VALUE_OBJECT(Urho3D::Vector3); 17 | EMBINDCEFV8_DECLARE_VALUE_OBJECT(Urho3D::IntVector2); 18 | EMBINDCEFV8_DECLARE_VALUE_OBJECT(Urho3D::Rect); 19 | EMBINDCEFV8_DECLARE_VALUE_OBJECT(Urho3D::Color); 20 | EMBINDCEFV8_DECLARE_VALUE_OBJECT(Urho3D::Quaternion); -------------------------------------------------------------------------------- /src/bindings/bindings_application.cpp: -------------------------------------------------------------------------------- 1 | #include "bindings.h" 2 | 3 | #include "application.h" 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | using namespace gengine::application; 12 | using namespace Urho3D; 13 | 14 | EMBINDCEFV8_DECLARE_STRING(String, CString); 15 | EMBINDCEFV8_IMPLEMENT_STRING(String); 16 | EMBINDCEFV8_DECLARE_CLASS(Scene, void); 17 | EMBINDCEFV8_DECLARE_CLASS(ResourceCache, void); 18 | EMBINDCEFV8_DECLARE_CLASS(Input, void); 19 | EMBINDCEFV8_DECLARE_CLASS(Context, void); 20 | EMBINDCEFV8_DECLARE_CLASS(Renderer, void); 21 | EMBINDCEFV8_DECLARE_CLASS(Audio, void); 22 | 23 | EMBINDCEFV8_BINDINGS(application) 24 | { 25 | embindcefv8::Class("App") 26 | .constructor() 27 | .method("runFrame", &App::runFrame) 28 | .method("run", &App::run) 29 | .method("setup", &App::setup) 30 | .method("start", &App::start) 31 | .method("exit", &App::exit) 32 | .method("getResourceCache", &App::getResourceCache) 33 | .method("getRenderer", &App::getRenderer) 34 | .method("getInput", &App::getInput) 35 | .method("getTimeStep", &App::getTimeStep) 36 | .method("getScene", &App::getScene) 37 | .method("getContext", &App::getContext) 38 | .method("getAudio", &App::getAudio) 39 | .method("getStartupString", &App::getStartupString) 40 | .method("isRunning", &App::isRunning) 41 | .method("setWindowTitle", &App::setWindowTitle) 42 | .method("takeScreenshot", &App::takeScreenshot) 43 | .method("setGuiFilename", &App::setGuiFilename) 44 | .method("setWindowSize", &App::setWindowSize) 45 | .method("setKeyboardElement", &App::setKeyboardElement) 46 | ; 47 | } 48 | -------------------------------------------------------------------------------- /src/bindings/bindings_audio.cpp: -------------------------------------------------------------------------------- 1 | #include "bindings.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace Urho3D; 10 | 11 | EMBINDCEFV8_DECLARE_CLASS(Audio, void); 12 | EMBINDCEFV8_DECLARE_CLASS(Context, void); 13 | EMBINDCEFV8_DECLARE_STRING(String, CString); 14 | 15 | EMBINDCEFV8_BINDINGS(audio) 16 | { 17 | embindcefv8::Class