| Previous | 199869 Revisions | Next |
| r37083 Friday 10th April, 2015 at 08:28:57 UTC by Vasantha Crabb |
|---|
| Merge branch 'master' of https://github.com/ZoeB/mame Conflicts: src/mess/drivers/elecbowl.c src/mess/drivers/hh_hmcs40.c src/mess/drivers/hh_tms1k.c |
| [/trunk] | makefile |
| [3rdparty/bgfx] | README.md |
| [3rdparty/bgfx/3rdparty/glsl-optimizer] | CMakeLists.txt Changelog.md |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/include] | c99_compat.h |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/src] | glsl_optimizer_lib.gyp |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl] | Makefile builtin_functions.cpp builtin_variables.cpp glsl_optimizer.cpp ir_print_glsl_visitor.cpp ir_print_glsl_visitor.h ir_print_metal_visitor.cpp linker.cpp loop_analysis.cpp loop_analysis.h loop_controls.cpp main.cpp opt_algebraic.cpp standalone_scaffolding.cpp |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp] | glcpp-lex.c glcpp-lex.l |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/src/mesa/main] | compiler.h |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/tests] | global-mutable-inES.txt* global-mutable-inES3.txt* global-mutable-outES.txt* global-mutable-outES3.txt* global-mutable-outES3Metal.txt* glsl_optimizer_tests.cpp |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment] | array-const-out.txt array-const-outES.txt array-const-outES3.txt array-const-outES3Metal.txt array-constconst-out.txt array-constconst-outES.txt array-constconst-outES3.txt array-constconst-outES3Metal.txt ast-outES3.txt bug-loop-undeclaredinductor-inES3.txt* bug-loop-undeclaredinductor-outES3.txt* bug-loop-undeclaredinductor-outES3Metal.txt* float-literals-in.txt* float-literals-out.txt* intrinsics-inES3.txt intrinsics-outES.txt intrinsics-outES3.txt intrinsics-outES3Metal.txt loop-for-inES3.txt loop-forafterdiscard-inES3.txt loop-fornounroll-outES.txt loop-forunbounded-outES.txt opt-movevars-sideeffect2-outES.txt prec-default-outES.txt prec-inlineexpr1-outES.txt prec-inlineexpr2-outES.txt prec-matrix-constr-inES3.txt* prec-matrix-constr-outES3.txt* prec-matrix-constr-outES3Metal.txt* sampler-precision-inES3.txt tex2dlod-outES.txt texOffset-outES3.txt texProj-outES.txt z-DirLMBasis-inES3.txt* z-DirLMBasis-outES3.txt* z-DirLMBasis-outES3Metal.txt* z-LightShaftsCoord-outES3.txt z-alphabumpspec-inES3.txt z-alphabumpspec-outES3.txt z-alphabumpspec-outES3Metal.txt z-collectshadows-inES3.txt z-fxaa-preset3-inES3.txt z-fxaa-preset3-out.txt z-fxaa-preset3-outES3.txt z-fxaa-preset3-outES3Metal.txt z-fxaa3-11-consolepc-outES.txt z-fxaa3-11-pc39-outES.txt z-prepasslight-inES3.txt z-prepasslight-outES.txt z-prepasslight-outES3.txt z-prepasslight-outES3Metal.txt z-treeleafloop-inES3.txt z-unishader-dirlm-inES3.txt z-unishader-dirlm-outES3.txt z-unishader-dirlm-outES3Metal.txt zun-MobileBumpSpec-inES3.txt zun-SSAO24-outES3.txt zun-SSAO24-outES3Metal.txt zun-SSAO8-outES.txt |
| [3rdparty/bgfx/3rdparty/glsl-optimizer/tests/vertex] | MF-GodRays-outES.txt MF-GodRays-outES3.txt bug-swizzle-lhs-cast-outES3.txt bug-swizzle-lhs-cast-outES3Metal.txt inputs-outES3.txt inputs-outES3Metal.txt loops-for-withvec4-outES3.txt loops-for-withvec4inductorW-inES3.txt* loops-for-withvec4inductorW-outES3.txt* loops-for-withvec4inductorW-outES3Metal.txt* opt-matrix-transpose-mul-outES3.txt opt-normalize-out.txt uniforms-arrays-outES3.txt z-NichsHybridLightVectorInsertBug-in.txt* z-NichsHybridLightVectorInsertBug-inES.txt* z-NichsHybridLightVectorInsertBug-inES3.txt* z-NichsHybridLightVectorInsertBug-out.txt* z-NichsHybridLightVectorInsertBug-outES.txt* z-NichsHybridLightVectorInsertBug-outES3.txt* z-NichsHybridLightVectorInsertBug-outES3Metal.txt* z-treeleaf-outES3.txt zun-Hidden_TerrainEngine_Details_BillboardWavingDoublePass-out.txt zun-Hidden_TerrainEngine_Details_BillboardWavingDoublePass1-out.txt zun-Hidden_TerrainEngine_Details_BillboardWavingDoublePass2-out.txt zun-Hidden_TerrainEngine_Details_WavingDoublePass1-out.txt |
| [3rdparty/bgfx/3rdparty/khronos/gl] | glext.h |
| [3rdparty/bgfx/3rdparty/ocornut-imgui] | imgui.h |
| [3rdparty/bgfx/examples/02-metaballs] | fs_metaballs.bin.h |
| [3rdparty/bgfx/examples/14-shadowvolumes] | shadowvolumes.cpp |
| [3rdparty/bgfx/examples/15-shadowmaps-simple] | shadowmaps_simple.cpp |
| [3rdparty/bgfx/examples/16-shadowmaps] | shadowmaps.cpp |
| [3rdparty/bgfx/examples/common/entry] | entry.cpp |
| [3rdparty/bgfx/examples/common/font] | fs_font_basic.bin.h fs_font_distance_field.bin.h fs_font_distance_field_subpixel.bin.h |
| [3rdparty/bgfx/examples/common/imgui] | fs_imgui_cubemap.bin.h fs_imgui_image.bin.h fs_imgui_image_swizz.bin.h fs_imgui_latlong.bin.h imgui.cpp makefile ocornut_imgui.cpp vs_imgui_latlong.bin.h |
| [3rdparty/bgfx/examples/common/nanovg] | nanovg.cpp |
| [3rdparty/bgfx/examples/runtime/shaders/gles] | fs_bump.bin fs_callback.bin fs_deferred_combine.bin fs_deferred_geom.bin fs_deferred_light.bin fs_hdr_blur.bin fs_hdr_bright.bin fs_hdr_lum.bin fs_hdr_lumavg.bin fs_hdr_mesh.bin fs_hdr_skybox.bin fs_hdr_tonemap.bin fs_ibl_mesh.bin fs_ibl_skybox.bin fs_mesh.bin fs_oit_wb.bin fs_oit_wb_separate.bin fs_particle.bin fs_raymarching.bin fs_shadowmaps_color_lightning_esm.bin fs_shadowmaps_color_lightning_esm_csm.bin fs_shadowmaps_color_lightning_esm_linear.bin fs_shadowmaps_color_lightning_esm_linear_csm.bin fs_shadowmaps_color_lightning_esm_linear_omni.bin fs_shadowmaps_color_lightning_esm_omni.bin fs_shadowmaps_color_lightning_hard.bin fs_shadowmaps_color_lightning_hard_csm.bin fs_shadowmaps_color_lightning_hard_linear.bin fs_shadowmaps_color_lightning_hard_linear_csm.bin fs_shadowmaps_color_lightning_hard_linear_omni.bin fs_shadowmaps_color_lightning_hard_omni.bin fs_shadowmaps_color_lightning_pcf.bin fs_shadowmaps_color_lightning_pcf_csm.bin fs_shadowmaps_color_lightning_pcf_linear.bin fs_shadowmaps_color_lightning_pcf_linear_csm.bin fs_shadowmaps_color_lightning_pcf_linear_omni.bin fs_shadowmaps_color_lightning_pcf_omni.bin fs_shadowmaps_color_lightning_vsm.bin fs_shadowmaps_color_lightning_vsm_csm.bin fs_shadowmaps_color_lightning_vsm_linear.bin fs_shadowmaps_color_lightning_vsm_linear_csm.bin fs_shadowmaps_color_lightning_vsm_linear_omni.bin fs_shadowmaps_color_lightning_vsm_omni.bin fs_shadowmaps_color_texture.bin fs_shadowmaps_hblur.bin fs_shadowmaps_hblur_vsm.bin fs_shadowmaps_packdepth.bin fs_shadowmaps_packdepth_linear.bin fs_shadowmaps_packdepth_vsm.bin fs_shadowmaps_packdepth_vsm_linear.bin fs_shadowmaps_unpackdepth.bin fs_shadowmaps_unpackdepth_vsm.bin fs_shadowmaps_vblur.bin fs_shadowmaps_vblur_vsm.bin fs_shadowvolume_color_lightning.bin fs_shadowvolume_color_texture.bin fs_shadowvolume_svbacktex1.bin fs_shadowvolume_svbacktex2.bin fs_shadowvolume_svfronttex1.bin fs_shadowvolume_svfronttex2.bin fs_shadowvolume_svside.bin fs_shadowvolume_svsidetex.bin fs_shadowvolume_texture_lightning.bin fs_sms_mesh.bin fs_sms_mesh_pd.bin fs_sms_shadow_pd.bin fs_stencil_color_lightning.bin fs_stencil_color_texture.bin fs_stencil_texture_lightning.bin fs_tree.bin |
| [3rdparty/bgfx/examples/runtime/shaders/glsl] | cs_init_instances.bin cs_update_instances.bin fs_bump.bin fs_callback.bin fs_deferred_combine.bin fs_deferred_light.bin fs_hdr_blur.bin fs_hdr_bright.bin fs_hdr_lum.bin fs_hdr_mesh.bin fs_hdr_tonemap.bin fs_mesh.bin fs_oit_wb.bin fs_oit_wb_separate.bin fs_raymarching.bin fs_shadowmaps_color_lightning_esm.bin fs_shadowmaps_color_lightning_esm_csm.bin fs_shadowmaps_color_lightning_esm_linear.bin fs_shadowmaps_color_lightning_esm_linear_csm.bin fs_shadowmaps_color_lightning_esm_linear_omni.bin fs_shadowmaps_color_lightning_esm_omni.bin fs_shadowmaps_color_lightning_hard.bin fs_shadowmaps_color_lightning_hard_csm.bin fs_shadowmaps_color_lightning_hard_linear.bin fs_shadowmaps_color_lightning_hard_linear_csm.bin fs_shadowmaps_color_lightning_hard_linear_omni.bin fs_shadowmaps_color_lightning_hard_omni.bin fs_shadowmaps_color_lightning_pcf.bin fs_shadowmaps_color_lightning_pcf_csm.bin fs_shadowmaps_color_lightning_pcf_linear.bin fs_shadowmaps_color_lightning_pcf_linear_csm.bin fs_shadowmaps_color_lightning_pcf_linear_omni.bin fs_shadowmaps_color_lightning_pcf_omni.bin fs_shadowmaps_color_lightning_vsm.bin fs_shadowmaps_color_lightning_vsm_csm.bin fs_shadowmaps_color_lightning_vsm_linear.bin fs_shadowmaps_color_lightning_vsm_linear_csm.bin fs_shadowmaps_color_lightning_vsm_linear_omni.bin fs_shadowmaps_color_lightning_vsm_omni.bin fs_shadowmaps_color_texture.bin fs_shadowmaps_hblur.bin fs_shadowmaps_hblur_vsm.bin fs_shadowmaps_packdepth.bin fs_shadowmaps_packdepth_linear.bin fs_shadowmaps_unpackdepth.bin fs_shadowmaps_vblur.bin fs_shadowmaps_vblur_vsm.bin fs_shadowvolume_color_lightning.bin fs_shadowvolume_color_texture.bin fs_shadowvolume_texture_lightning.bin fs_sms_mesh.bin fs_sms_mesh_pd.bin fs_sms_shadow_pd.bin fs_stencil_color_lightning.bin fs_stencil_color_texture.bin fs_stencil_texture_lightning.bin fs_tree.bin |
| [3rdparty/bgfx/include] | bgfx.c99.h bgfx.h |
| [3rdparty/bgfx/scripts] | bgfx.lua example-common.lua shaderc.lua |
| [3rdparty/bgfx/src] | bgfx.cpp bgfx_p.h config.h glcontext_eagl.h glcontext_eagl.mm glcontext_egl.cpp glcontext_egl.h glcontext_glx.cpp glcontext_glx.h glcontext_nsgl.h glcontext_nsgl.mm glcontext_ppapi.cpp glcontext_ppapi.h glcontext_wgl.cpp glcontext_wgl.h image.cpp renderer_d3d11.cpp renderer_d3d9.cpp renderer_gl.cpp renderer_gl.h |
| [3rdparty/bgfx/tools/geometryc] | geometryc.cpp |
| [3rdparty/bgfx/tools/shaderc] | shaderc.cpp shaderc_d3d11.cpp* shaderc_d3d9.cpp* |
| [3rdparty/bx/3rdparty/CL] | cl_platform.h |
| [3rdparty/bx/include/bx] | fpumath.h ringbuffer.h uint32_t.h |
| [3rdparty/bx/include/tinystl] | hash_base.h string.h unordered_set.h vector.h |
| [3rdparty/bx/scripts] | toolchain.lua |
| [3rdparty/bx/tests] | unordered_set_copyctor.cpp* unordered_set_pod.cpp* |
| [3rdparty/bx/tools/bin/darwin] | genie |
| [3rdparty/bx/tools/bin/linux] | genie |
| [3rdparty/bx/tools/bin/windows] | genie.exe |
| [scripts] | genie.lua toolchain.lua |
| [scripts/src] | bus.lua cpu.lua emu.lua lib.lua machine.lua main.lua tools.lua |
| [scripts/src/osd] | modules.lua osdmini.lua sdl.lua sdl_cfg.lua windows.lua windows_cfg.lua |
| [scripts/target/mess] | mess.lua |
| [src/build] | |
| [src/emu] | profiler.h |
| [src/emu/bus/abcbus] | abc890.c abc890.h abcbus.c abcbus.h |
| [src/emu/bus/ieee488] | c8050fdc.c c8050fdc.h |
| [src/emu/cpu/nec] | v53.c |
| [src/emu/cpu/sh4] | sh4.c sh4.h |
| [src/emu/machine] | 6522via.c 6522via.h hdc9234.c hdc9234.h mos6530n.c* mos6530n.h* z80pio.c z80pio.h |
| [src/emu/sound] | l7a1045_l6028_dsp_a.c l7a1045_l6028_dsp_a.h okim9810.c okim9810.h |
| [src/emu/video] | pc_vga.c pc_vga.h |
| [src/lib/formats] | abcfd2_dsk.c* abcfd2_dsk.h* |
| [src/mame] | mame.lst |
| [src/mame/audio] | exidy.c hng64.c wiping.c wiping.h |
| [src/mame/drivers] | cheekyms.c clshroad.c cv1k.c fruitpc.c hexion.c invqix.c jackie.c konamim2.c lwings.c peplus.c pgm.c pitnrun.c sbugger.c spcforce.c splash.c spoker.c ssfindo.c suprnova.c tail2nos.c victory.c |
| [src/mame/includes] | cheekyms.h clshroad.h pitnrun.h sbugger.h spcforce.h splash.h tail2nos.h victory.h |
| [src/mame/machine] | pitnrun.c |
| [src/mame/video] | cheekyms.c clshroad.c pitnrun.c sbugger.c spcforce.c splash.c tail2nos.c victory.c |
| [src/mess] | mess.lst |
| [src/mess/drivers] | abc80.c abc80x.c elecbowl.c hh_hmcs40.c hh_tms1k.c pc9801.c sms.c tispeak.c |
| [src/mess/includes] | abc1600.h abc80.h |
| [src/mess/layout] | einvader.lay* |
| [src/mess/machine] | pce_cd.c pce_cd.h victor9k_fdc.c victor9k_fdc.h |
| [src/osd] | strconv.h |
| [src/osd/modules] | osdmodule.c osdmodule.h |
| [src/osd/modules/debugger] | debugint.c debugosx.m debugqt.c debugwin.c none.c |
| [src/osd/modules/debugger/osx] | debugconsole.m debugosx.h debugview.h debugview.m disassemblyviewer.m memoryviewer.m pointsviewer.m |
| [src/osd/modules/debugger/qt] | debuggerview.c |
| [src/osd/modules/debugger/win] | uimetrics.c uimetrics.h |
| [src/osd/modules/font] | font_none.c font_osx.c font_sdl.c font_windows.c |
| [src/osd/modules/lib] | osdobj_common.c osdobj_common.h |
| [src/osd/modules/midi] | none.c portmidi.c |
| [src/osd/modules/netdev] | none.c pcap.c taptun.c |
| [src/osd/modules/render] | drawogl.c |
| [src/osd/modules/render/d3d] | d3d9intf.c |
| [src/osd/modules/sound] | coreaudio_sound.c direct_sound.c js_sound.c none.c sdl_sound.c |
| [src/osd/sdl] | aueffectutil-Info.plist* aueffectutil.m* main.c |
| [src/osd/windows] |
| r245594 | r245595 | |
|---|---|---|
| 4 | 4 | include_directories(src/mesa) |
| 5 | 5 | include_directories(src/mapi) |
| 6 | 6 | include_directories(src/glsl) |
| 7 | include_directories(src) | |
| 7 | 8 | |
| 8 | 9 | option (DEBUG "Enable debugging" FALSE) |
| 9 | 10 | |
| r245594 | r245595 | |
| 16 | 17 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -s") |
| 17 | 18 | endif() |
| 18 | 19 | |
| 19 | file(GLOB glcpp-library_sources src/glsl/glcpp/*.c) | |
| 20 | file(GLOB glcpp-library_sources src/glsl/glcpp/*.c src/util/*.c) | |
| 20 | 21 | #file(GLOB glcpp-library_sources_remove src/glsl/glcpp/glcpp.c) |
| 21 | 22 | #list(REMOVE_ITEM glcpp-library_sources ${glcpp-library_sources_remove}) |
| 22 | 23 | add_library(glcpp-library ${glcpp-library_sources}) |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | GLSL optimizer Change Log |
| 2 | 2 | ========================= |
| 3 | 3 | |
| 4 | 2015 04 | |
| 5 | ------- | |
| 6 | ||
| 7 | Fixes: | |
| 8 | ||
| 9 | * Metal: fixed some bugs with translation of weird loops. | |
| 10 | ||
| 11 | ||
| 12 | 2015 02 | |
| 13 | ------- | |
| 14 | ||
| 15 | Tweaks: | |
| 16 | ||
| 17 | * Texture LOD sampling functions on GLES2.0 now produce a wrapper call, that does approximation | |
| 18 | (mip bias) on devices that don't support GL_EXT_shader_texture_lod. | |
| 19 | * Undefined precision integers on GLES now default to highp. | |
| 20 | ||
| 21 | ||
| 22 | 2015 01 | |
| 23 | ------- | |
| 24 | ||
| 25 | Fixes: | |
| 26 | ||
| 27 | * Float literals are printed with 7 significant digits now. | |
| 28 | * Metal: GLSL mod() is properly translated into Metal's fmod(). | |
| 29 | * Metal: Fixed some cases of reciprocal (1/x) printing missing half precision cast. | |
| 30 | * GLES3: textureOffset with a mipmap bias is printed correctly now. | |
| 31 | * Fixed a bug with loop inductor detection if the inductor was used before the loop for some things. | |
| 32 | * Fixed printing of int/float bitcast operations. | |
| 33 | * Improved precision determination of some constructs. | |
| 34 | ||
| 35 | ||
| 4 | 36 | 2014 10 |
| 5 | 37 | ------- |
| 6 | 38 |
| r245594 | r245595 | |
|---|---|---|
| 134 | 134 | * C99 __func__ macro |
| 135 | 135 | */ |
| 136 | 136 | #ifndef __func__ |
| 137 | # if defined(_MSC_VER) | |
| 138 | # if _MSC_VER >= 1300 | |
| 139 | # define __func__ __FUNCTION__ | |
| 140 | # else | |
| 141 | # define __func__ "<unknown>" | |
| 142 | # endif | |
| 143 | # elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) | |
| 137 | # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(_MSC_VER) | |
| 144 | 138 | /* C99 */ |
| 145 | 139 | # elif defined(__SUNPRO_C) && defined(__C99FEATURES__) |
| 146 | 140 | /* C99 */ |
| r245594 | r245595 | |
| 150 | 144 | # else |
| 151 | 145 | # define __func__ "<unknown>" |
| 152 | 146 | # endif |
| 147 | # elif defined(_MSC_VER) | |
| 148 | # if _MSC_VER >= 1300 | |
| 149 | # define __func__ __FUNCTION__ | |
| 150 | # else | |
| 151 | # define __func__ "<unknown>" | |
| 152 | # endif | |
| 153 | 153 | # else |
| 154 | 154 | # define __func__ "<unknown>" |
| 155 | 155 | # endif |
| r245594 | r245595 | |
|---|---|---|
| 3 | 3 | CPPFLAGS += -I../talloc \ |
| 4 | 4 | -I../mesa \ |
| 5 | 5 | -I../mapi \ |
| 6 | -I../../include | |
| 6 | -I../../include \ | |
| 7 | -I.. | |
| 7 | 8 | |
| 8 | 9 | CXXFLAGS += -s -Wall -Os -fdata-sections -ffunction-sections |
| 9 | 10 | CFLAGS += -s -Wall -Os -fdata-sections -ffunction-sections |
| 10 | 11 | |
| 11 | 12 | # This list gleaned from the VC project file. Update when needed |
| 12 | SRC = ast_expr.cpp \ | |
| 13 | SRC = ast_array_index.cpp \ | |
| 14 | ast_expr.cpp \ | |
| 13 | 15 | ast_function.cpp \ |
| 14 | 16 | ast_to_hir.cpp \ |
| 15 | 17 | ast_type.cpp \ |
| 16 | 18 | builtin_functions.cpp \ |
| 19 | builtin_types.cpp \ | |
| 20 | builtin_variables.cpp \ | |
| 17 | 21 | glsl_lexer.cpp \ |
| 18 | 22 | glsl_optimizer.cpp \ |
| 19 | 23 | glsl_parser.cpp \ |
| r245594 | r245595 | |
| 42 | 46 | ir_unused_structs.cpp \ |
| 43 | 47 | ir_validate.cpp \ |
| 44 | 48 | ir_variable_refcount.cpp \ |
| 49 | link_atomics.cpp \ | |
| 50 | linker.cpp \ | |
| 45 | 51 | link_functions.cpp \ |
| 46 | linker.cpp \ | |
| 52 | link_interface_blocks.cpp \ | |
| 53 | link_uniform_block_active_visitor.cpp \ | |
| 54 | link_uniform_blocks.cpp \ | |
| 55 | link_uniform_initializers.cpp \ | |
| 56 | link_uniforms.cpp \ | |
| 57 | link_varyings.cpp \ | |
| 47 | 58 | loop_analysis.cpp \ |
| 48 | 59 | loop_controls.cpp \ |
| 49 | 60 | loop_unroll.cpp \ |
| 61 | lower_clip_distance.cpp \ | |
| 50 | 62 | lower_discard.cpp \ |
| 63 | lower_discard_flow.cpp \ | |
| 51 | 64 | lower_if_to_cond_assign.cpp \ |
| 52 | 65 | lower_instructions.cpp \ |
| 53 | 66 | lower_jumps.cpp \ |
| 54 | 67 | lower_mat_op_to_vec.cpp \ |
| 68 | lower_named_interface_blocks.cpp \ | |
| 55 | 69 | lower_noise.cpp \ |
| 70 | lower_offset_array.cpp \ | |
| 71 | lower_output_reads.cpp \ | |
| 72 | lower_packed_varyings.cpp \ | |
| 73 | lower_packing_builtins.cpp \ | |
| 74 | lower_ubo_reference.cpp \ | |
| 56 | 75 | lower_variable_index_to_cond_assign.cpp \ |
| 57 | 76 | lower_vec_index_to_cond_assign.cpp \ |
| 58 | 77 | lower_vec_index_to_swizzle.cpp \ |
| 59 | 78 | lower_vector.cpp \ |
| 79 | lower_vector_insert.cpp \ | |
| 80 | lower_vertex_id.cpp \ | |
| 60 | 81 | opt_algebraic.cpp \ |
| 61 | 82 | opt_array_splitting.cpp \ |
| 62 | 83 | opt_constant_folding.cpp \ |
| r245594 | r245595 | |
| 65 | 86 | opt_copy_propagation.cpp \ |
| 66 | 87 | opt_copy_propagation_elements.cpp \ |
| 67 | 88 | opt_cse.cpp \ |
| 89 | opt_dead_builtin_variables.cpp \ | |
| 68 | 90 | opt_dead_builtin_varyings.cpp \ |
| 69 | 91 | opt_dead_code.cpp \ |
| 70 | 92 | opt_dead_code_local.cpp \ |
| r245594 | r245595 | |
| 73 | 95 | opt_flip_matrices.cpp \ |
| 74 | 96 | opt_function_inlining.cpp \ |
| 75 | 97 | opt_if_simplification.cpp \ |
| 98 | opt_minmax.cpp \ | |
| 76 | 99 | opt_noop_swizzle.cpp \ |
| 100 | opt_rebalance_tree.cpp \ | |
| 77 | 101 | opt_redundant_jumps.cpp \ |
| 78 | 102 | opt_structure_splitting.cpp \ |
| 79 | 103 | opt_swizzle_swizzle.cpp \ |
| 80 | 104 | opt_tree_grafting.cpp \ |
| 81 | 105 | opt_vectorize.cpp \ |
| 82 | | |
| 106 | opt_vector_splitting.cpp \ | |
| 83 | 107 | s_expression.cpp \ |
| 84 | 108 | standalone_scaffolding.cpp \ |
| 85 | 109 | strtod.c \ |
| 86 | 110 | glcpp/glcpp-lex.c \ |
| 87 | 111 | glcpp/glcpp-parse.c \ |
| 88 | 112 | glcpp/pp.c \ |
| 89 | ../mesa/main/hash_table.c \ | |
| 90 | 113 | ../mesa/main/imports.c \ |
| 91 | 114 | ../mesa/program/prog_hash_table.c \ |
| 92 | ../mesa/program/symbol_table.c | |
| 115 | ../mesa/program/symbol_table.c \ | |
| 116 | ../util/hash_table.c \ | |
| 117 | ../util/ralloc.c | |
| 93 | 118 | |
| 94 | 119 | |
| 95 | 120 | OBJS1 = $(SRC:.cpp=.o) |
| r245594 | r245595 | |
|---|---|---|
| 53 | 53 | * name and parameters. |
| 54 | 54 | */ |
| 55 | 55 | |
| 56 | #define _USE_MATH_DEFINES | |
| 57 | 56 | #include <stdarg.h> |
| 58 | 57 | #include <stdio.h> |
| 59 | 58 | #include "main/core.h" /* for struct gl_shader */ |
| r245594 | r245595 | |
|---|---|---|
| 934 | 934 | if (state->AMD_shader_stencil_export_warn) |
| 935 | 935 | var->enable_extension_warning("GL_AMD_shader_stencil_export"); |
| 936 | 936 | } |
| 937 | ||
| 937 | ||
| 938 | 938 | if (state->EXT_frag_depth_enable) { |
| 939 | 939 | ir_variable *const var = |
| 940 | 940 | add_output(FRAG_RESULT_DEPTH, float_t, "gl_FragDepthEXT", glsl_precision_high); |
| 941 | 941 | if (state->EXT_frag_depth_warn) |
| 942 | 942 | var->enable_extension_warning("GL_EXT_frag_depth"); |
| 943 | 943 | } |
| 944 | ||
| 944 | ||
| 945 | 945 | if (state->EXT_shader_framebuffer_fetch_enable) { |
| 946 | 946 | ir_variable *const var = |
| 947 | 947 | add_input(VARYING_SLOT_VAR0, array(vec4_t, state->Const.MaxDrawBuffers), "gl_LastFragData", glsl_precision_medium); |
| r245594 | r245595 | |
| 949 | 949 | var->enable_extension_warning("GL_EXT_shader_framebuffer_fetch"); |
| 950 | 950 | } |
| 951 | 951 | |
| 952 | { | |
| 953 | ir_variable *var; | |
| 954 | var = add_output(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID", glsl_precision_high); | |
| 955 | var->data.interpolation = INTERP_QUALIFIER_FLAT; | |
| 956 | } | |
| 957 | ||
| 958 | 952 | if (state->ARB_sample_shading_enable) { |
| 959 | 953 | add_system_value(SYSTEM_VALUE_SAMPLE_ID, int_t, "gl_SampleID", glsl_precision_high); |
| 960 | 954 | add_system_value(SYSTEM_VALUE_SAMPLE_POS, vec2_t, "gl_SamplePosition", glsl_precision_high); |
| r245594 | r245595 | |
|---|---|---|
| 21 | 21 | #include <string.h> |
| 22 | 22 | #include <errno.h> |
| 23 | 23 | #include <stdlib.h> |
| 24 | #include <c99_compat.h> | |
| 25 | 24 | |
| 26 | 25 | /* end standard C headers. */ |
| 27 | 26 | |
| r245594 | r245595 | |
| 35 | 34 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 36 | 35 | |
| 37 | 36 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
| 38 | * if you want the limit (max/min) macros for int types. | |
| 37 | * if you want the limit (max/min) macros for int types. | |
| 39 | 38 | */ |
| 40 | 39 | #ifndef __STDC_LIMIT_MACROS |
| 41 | 40 | #define __STDC_LIMIT_MACROS 1 |
| r245594 | r245595 | |
| 52 | 51 | typedef signed char flex_int8_t; |
| 53 | 52 | typedef short int flex_int16_t; |
| 54 | 53 | typedef int flex_int32_t; |
| 55 | typedef unsigned char flex_uint8_t; | |
| 54 | typedef unsigned char flex_uint8_t; | |
| 56 | 55 | typedef unsigned short int flex_uint16_t; |
| 57 | 56 | typedef unsigned int flex_uint32_t; |
| 58 | 57 | |
| r245594 | r245595 | |
| 185 | 184 | #define EOB_ACT_LAST_MATCH 2 |
| 186 | 185 | |
| 187 | 186 | #define YY_LESS_LINENO(n) |
| 188 | ||
| 187 | ||
| 189 | 188 | /* Return all but the first "n" matched characters back to the input stream. */ |
| 190 | 189 | #define yyless(n) \ |
| 191 | 190 | do \ |
| r245594 | r245595 | |
| 247 | 246 | |
| 248 | 247 | int yy_bs_lineno; /**< The line count. */ |
| 249 | 248 | int yy_bs_column; /**< The column count. */ |
| 250 | ||
| 249 | ||
| 251 | 250 | /* Whether to try to fill the input buffer when we reach the |
| 252 | 251 | * end of it. |
| 253 | 252 | */ |
| r245594 | r245595 | |
| 823 | 822 | /* This must go here because YYSTYPE and YYLTYPE are included |
| 824 | 823 | * from bison output in section 1.*/ |
| 825 | 824 | # define yylval yyg->yylval_r |
| 826 | ||
| 825 | ||
| 827 | 826 | # define yylloc yyg->yylloc_r |
| 828 | ||
| 827 | ||
| 829 | 828 | int glcpp_lex_init (yyscan_t* scanner); |
| 830 | 829 | |
| 831 | 830 | int glcpp_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); |
| r245594 | r245595 | |
| 864 | 863 | void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); |
| 865 | 864 | |
| 866 | 865 | YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner ); |
| 867 | ||
| 866 | ||
| 868 | 867 | void glcpp_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); |
| 869 | ||
| 868 | ||
| 870 | 869 | /* Macros after this point can all be overridden by user definitions in |
| 871 | 870 | * section 1. |
| 872 | 871 | */ |
| r245594 | r245595 | |
| 880 | 879 | #endif |
| 881 | 880 | |
| 882 | 881 | static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); |
| 883 | ||
| 882 | ||
| 884 | 883 | #ifndef yytext_ptr |
| 885 | 884 | static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); |
| 886 | 885 | #endif |
| r245594 | r245595 | |
| 900 | 899 | #endif |
| 901 | 900 | |
| 902 | 901 | static void yy_push_state (int new_state ,yyscan_t yyscanner); |
| 903 | ||
| 902 | ||
| 904 | 903 | static void yy_pop_state (yyscan_t yyscanner ); |
| 905 | ||
| 904 | ||
| 906 | 905 | static int yy_top_state (yyscan_t yyscanner ); |
| 907 | ||
| 906 | ||
| 908 | 907 | /* Amount of stuff to slurp up with each read. */ |
| 909 | 908 | #ifndef YY_READ_BUF_SIZE |
| 910 | 909 | #ifdef __ia64__ |
| r245594 | r245595 | |
| 1362 | 1361 | * While in the <DEFINE> state we also need to explicitly |
| 1363 | 1362 | * handle a few other things that may appear before the |
| 1364 | 1363 | * identifier: |
| 1365 | * | |
| 1364 | * | |
| 1366 | 1365 | * * Comments, (handled above with the main support for |
| 1367 | 1366 | * comments). |
| 1368 | 1367 | * |
| r245594 | r245595 | |
| 2185 | 2184 | YY_BUFFER_STATE glcpp__create_buffer (FILE * file, int size , yyscan_t yyscanner) |
| 2186 | 2185 | { |
| 2187 | 2186 | YY_BUFFER_STATE b; |
| 2188 | ||
| 2187 | ||
| 2189 | 2188 | b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
| 2190 | 2189 | if ( ! b ) |
| 2191 | 2190 | YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); |
| r245594 | r245595 | |
| 2251 | 2250 | } |
| 2252 | 2251 | |
| 2253 | 2252 | b->yy_is_interactive = 0; |
| 2254 | ||
| 2253 | ||
| 2255 | 2254 | errno = oerrno; |
| 2256 | 2255 | } |
| 2257 | 2256 | |
| r245594 | r245595 | |
| 2357 | 2356 | , yyscanner); |
| 2358 | 2357 | if ( ! yyg->yy_buffer_stack ) |
| 2359 | 2358 | YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" ); |
| 2360 | ||
| 2359 | ||
| 2361 | 2360 | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
| 2362 | ||
| 2361 | ||
| 2363 | 2362 | yyg->yy_buffer_stack_max = num_to_alloc; |
| 2364 | 2363 | yyg->yy_buffer_stack_top = 0; |
| 2365 | 2364 | return; |
| r245594 | r245595 | |
| 2388 | 2387 | * @param base the character buffer |
| 2389 | 2388 | * @param size the size in bytes of the character buffer |
| 2390 | 2389 | * @param yyscanner The scanner object. |
| 2391 | * @return the newly allocated buffer state object. | |
| 2390 | * @return the newly allocated buffer state object. | |
| 2392 | 2391 | */ |
| 2393 | 2392 | YY_BUFFER_STATE glcpp__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
| 2394 | 2393 | { |
| 2395 | 2394 | YY_BUFFER_STATE b; |
| 2396 | ||
| 2395 | ||
| 2397 | 2396 | if ( size < 2 || |
| 2398 | 2397 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
| 2399 | 2398 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
| r245594 | r245595 | |
| 2429 | 2428 | */ |
| 2430 | 2429 | YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner) |
| 2431 | 2430 | { |
| 2432 | ||
| 2431 | ||
| 2433 | 2432 | return glcpp__scan_bytes(yystr,strlen(yystr) ,yyscanner); |
| 2434 | 2433 | } |
| 2435 | 2434 | |
| r245594 | r245595 | |
| 2446 | 2445 | char *buf; |
| 2447 | 2446 | yy_size_t n; |
| 2448 | 2447 | int i; |
| 2449 | ||
| 2448 | ||
| 2450 | 2449 | /* Get memory for full buffer, including space for trailing EOB's. */ |
| 2451 | 2450 | n = _yybytes_len + 2; |
| 2452 | 2451 | buf = (char *) glcpp_alloc(n ,yyscanner ); |
| r245594 | r245595 | |
| 2554 | 2553 | int glcpp_get_lineno (yyscan_t yyscanner) |
| 2555 | 2554 | { |
| 2556 | 2555 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2557 | ||
| 2556 | ||
| 2558 | 2557 | if (! YY_CURRENT_BUFFER) |
| 2559 | 2558 | return 0; |
| 2560 | ||
| 2559 | ||
| 2561 | 2560 | return yylineno; |
| 2562 | 2561 | } |
| 2563 | 2562 | |
| r245594 | r245595 | |
| 2567 | 2566 | int glcpp_get_column (yyscan_t yyscanner) |
| 2568 | 2567 | { |
| 2569 | 2568 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2570 | ||
| 2569 | ||
| 2571 | 2570 | if (! YY_CURRENT_BUFFER) |
| 2572 | 2571 | return 0; |
| 2573 | ||
| 2572 | ||
| 2574 | 2573 | return yycolumn; |
| 2575 | 2574 | } |
| 2576 | 2575 | |
| r245594 | r245595 | |
| 2631 | 2630 | |
| 2632 | 2631 | /* lineno is only valid if an input buffer exists. */ |
| 2633 | 2632 | if (! YY_CURRENT_BUFFER ) |
| 2634 | yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner); | |
| 2635 | ||
| 2633 | yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner); | |
| 2634 | ||
| 2636 | 2635 | yylineno = line_number; |
| 2637 | 2636 | } |
| 2638 | 2637 | |
| r245594 | r245595 | |
| 2646 | 2645 | |
| 2647 | 2646 | /* column is only valid if an input buffer exists. */ |
| 2648 | 2647 | if (! YY_CURRENT_BUFFER ) |
| 2649 | yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner); | |
| 2650 | ||
| 2648 | yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner); | |
| 2649 | ||
| 2651 | 2650 | yycolumn = column_no; |
| 2652 | 2651 | } |
| 2653 | 2652 | |
| r245594 | r245595 | |
| 2700 | 2699 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2701 | 2700 | return yylloc; |
| 2702 | 2701 | } |
| 2703 | ||
| 2702 | ||
| 2704 | 2703 | void glcpp_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) |
| 2705 | 2704 | { |
| 2706 | 2705 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2707 | 2706 | yylloc = yylloc_param; |
| 2708 | 2707 | } |
| 2709 | ||
| 2708 | ||
| 2710 | 2709 | /* User-visible API */ |
| 2711 | 2710 | |
| 2712 | 2711 | /* glcpp_lex_init is special because it creates the scanner itself, so it is |
| r245594 | r245595 | |
| 2754 | 2753 | errno = EINVAL; |
| 2755 | 2754 | return 1; |
| 2756 | 2755 | } |
| 2757 | ||
| 2756 | ||
| 2758 | 2757 | *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
| 2759 | ||
| 2758 | ||
| 2760 | 2759 | if (*ptr_yy_globals == NULL){ |
| 2761 | 2760 | errno = ENOMEM; |
| 2762 | 2761 | return 1; |
| 2763 | 2762 | } |
| 2764 | ||
| 2763 | ||
| 2765 | 2764 | /* By setting to 0xAA, we expose bugs in |
| 2766 | 2765 | yy_init_globals. Leave at 0x00 for releases. */ |
| 2767 | 2766 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
| 2768 | ||
| 2767 | ||
| 2769 | 2768 | glcpp_set_extra (yy_user_defined, *ptr_yy_globals); |
| 2770 | ||
| 2769 | ||
| 2771 | 2770 | return yy_init_globals ( *ptr_yy_globals ); |
| 2772 | 2771 | } |
| 2773 | 2772 |
| r245594 | r245595 | |
|---|---|---|
| 25 | 25 | #include <stdio.h> |
| 26 | 26 | #include <string.h> |
| 27 | 27 | #include <ctype.h> |
| 28 | #include <c99_compat.h> | |
| 29 | 28 | |
| 30 | 29 | #include "glcpp.h" |
| 31 | 30 | #include "glcpp-parse.h" |
| r245594 | r245595 | |
|---|---|---|
| 206 | 206 | #endif |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | ||
| 210 | struct precision_ctx | |
| 211 | { | |
| 212 | exec_list* root_ir; | |
| 213 | bool res; | |
| 214 | }; | |
| 215 | ||
| 216 | ||
| 209 | 217 | static void propagate_precision_deref(ir_instruction *ir, void *data) |
| 210 | 218 | { |
| 211 | 219 | // variable deref with undefined precision: take from variable itself |
| r245594 | r245595 | |
| 213 | 221 | if (der && der->get_precision() == glsl_precision_undefined && der->var->data.precision != glsl_precision_undefined) |
| 214 | 222 | { |
| 215 | 223 | der->set_precision ((glsl_precision)der->var->data.precision); |
| 216 | | |
| 224 | ((precision_ctx*)data)->res = true; | |
| 217 | 225 | } |
| 218 | 226 | |
| 219 | 227 | // array deref with undefined precision: take from array itself |
| r245594 | r245595 | |
| 221 | 229 | if (der_arr && der_arr->get_precision() == glsl_precision_undefined && der_arr->array->get_precision() != glsl_precision_undefined) |
| 222 | 230 | { |
| 223 | 231 | der_arr->set_precision (der_arr->array->get_precision()); |
| 224 | | |
| 232 | ((precision_ctx*)data)->res = true; | |
| 225 | 233 | } |
| 226 | 234 | |
| 227 | 235 | // swizzle with undefined precision: take from swizzle argument |
| r245594 | r245595 | |
| 229 | 237 | if (swz && swz->get_precision() == glsl_precision_undefined && swz->val->get_precision() != glsl_precision_undefined) |
| 230 | 238 | { |
| 231 | 239 | swz->set_precision (swz->val->get_precision()); |
| 232 | | |
| 240 | ((precision_ctx*)data)->res = true; | |
| 233 | 241 | } |
| 234 | 242 | |
| 235 | 243 | } |
| r245594 | r245595 | |
| 252 | 260 | if (expr->get_precision() != prec_params_max) |
| 253 | 261 | { |
| 254 | 262 | expr->set_precision (prec_params_max); |
| 255 | | |
| 263 | ((precision_ctx*)data)->res = true; | |
| 256 | 264 | } |
| 257 | 265 | |
| 258 | 266 | } |
| 259 | 267 | |
| 268 | struct undefined_ass_ctx | |
| 269 | { | |
| 270 | ir_variable* var; | |
| 271 | bool res; | |
| 272 | }; | |
| 260 | 273 | |
| 274 | static void has_only_undefined_precision_assignments(ir_instruction *ir, void *data) | |
| 275 | { | |
| 276 | ir_assignment* ass = ir->as_assignment(); | |
| 277 | if (!ass) | |
| 278 | return; | |
| 279 | undefined_ass_ctx* ctx = (undefined_ass_ctx*)data; | |
| 280 | if (ass->whole_variable_written() != ctx->var) | |
| 281 | return; | |
| 282 | glsl_precision prec = ass->rhs->get_precision(); | |
| 283 | if (prec == glsl_precision_undefined) | |
| 284 | return; | |
| 285 | ctx->res = false; | |
| 286 | } | |
| 287 | ||
| 288 | ||
| 261 | 289 | static void propagate_precision_assign(ir_instruction *ir, void *data) |
| 262 | 290 | { |
| 263 | 291 | ir_assignment* ass = ir->as_assignment(); |
| 264 | if (ass && ass->lhs && ass->rhs) | |
| 292 | if (!ass || !ass->lhs || !ass->rhs) | |
| 293 | return; | |
| 294 | ||
| 295 | glsl_precision lp = ass->lhs->get_precision(); | |
| 296 | glsl_precision rp = ass->rhs->get_precision(); | |
| 297 | ||
| 298 | // for assignments with LHS having undefined precision, take it from RHS | |
| 299 | if (rp != glsl_precision_undefined) | |
| 265 | 300 | { |
| 266 | glsl_precision lp = ass->lhs->get_precision(); | |
| 267 | glsl_precision rp = ass->rhs->get_precision(); | |
| 268 | if (rp == glsl_precision_undefined) | |
| 269 | return; | |
| 270 | 301 | ir_variable* lhs_var = ass->lhs->variable_referenced(); |
| 271 | 302 | if (lp == glsl_precision_undefined) |
| 272 | 303 | { |
| 273 | 304 | if (lhs_var) |
| 274 | 305 | lhs_var->data.precision = rp; |
| 275 | 306 | ass->lhs->set_precision (rp); |
| 276 | | |
| 307 | ((precision_ctx*)data)->res = true; | |
| 277 | 308 | } |
| 309 | return; | |
| 278 | 310 | } |
| 311 | ||
| 312 | // for assignments where LHS has precision, but RHS is a temporary variable | |
| 313 | // with undefined precision that's only assigned from other undefined precision | |
| 314 | // sources -> make the RHS variable take LHS precision | |
| 315 | if (lp != glsl_precision_undefined && rp == glsl_precision_undefined) | |
| 316 | { | |
| 317 | ir_dereference* deref = ass->rhs->as_dereference(); | |
| 318 | if (deref) | |
| 319 | { | |
| 320 | ir_variable* rhs_var = deref->variable_referenced(); | |
| 321 | if (rhs_var && rhs_var->data.mode == ir_var_temporary && rhs_var->data.precision == glsl_precision_undefined) | |
| 322 | { | |
| 323 | undefined_ass_ctx ctx; | |
| 324 | ctx.var = rhs_var; | |
| 325 | // find if we only assign to it from undefined precision sources | |
| 326 | ctx.res = true; | |
| 327 | exec_list* root_ir = ((precision_ctx*)data)->root_ir; | |
| 328 | foreach_in_list(ir_instruction, inst, root_ir) | |
| 329 | { | |
| 330 | visit_tree (ir, has_only_undefined_precision_assignments, &ctx); | |
| 331 | } | |
| 332 | if (ctx.res) | |
| 333 | { | |
| 334 | rhs_var->data.precision = lp; | |
| 335 | ass->rhs->set_precision(lp); | |
| 336 | ((precision_ctx*)data)->res = true; | |
| 337 | } | |
| 338 | } | |
| 339 | } | |
| 340 | return; | |
| 341 | } | |
| 279 | 342 | } |
| 280 | 343 | |
| 344 | ||
| 281 | 345 | static void propagate_precision_call(ir_instruction *ir, void *data) |
| 282 | 346 | { |
| 283 | 347 | ir_call* call = ir->as_call(); |
| r245594 | r245595 | |
| 302 | 366 | if (call->return_deref->get_precision() != prec_params_max) |
| 303 | 367 | { |
| 304 | 368 | call->return_deref->set_precision (prec_params_max); |
| 305 | | |
| 369 | ((precision_ctx*)data)->res = true; | |
| 306 | 370 | } |
| 307 | 371 | } |
| 308 | 372 | } |
| 309 | 373 | |
| 310 | ||
| 311 | 374 | static bool propagate_precision(exec_list* list, bool assign_high_to_undefined) |
| 312 | 375 | { |
| 313 | 376 | bool anyProgress = false; |
| 314 | bool res; | |
| 377 | precision_ctx ctx; | |
| 378 | ||
| 315 | 379 | do { |
| 316 | res = false; | |
| 380 | ctx.res = false; | |
| 381 | ctx.root_ir = list; | |
| 317 | 382 | foreach_in_list(ir_instruction, ir, list) |
| 318 | 383 | { |
| 319 | visit_tree (ir, propagate_precision_deref, &res); | |
| 320 | visit_tree (ir, propagate_precision_assign, &res); | |
| 321 | visit_tree (ir, propagate_precision_call, &res); | |
| 322 | visit_tree (ir, propagate_precision_expr, &res); | |
| 384 | visit_tree (ir, propagate_precision_deref, &ctx); | |
| 385 | visit_tree (ir, propagate_precision_assign, &ctx); | |
| 386 | visit_tree (ir, propagate_precision_call, &ctx); | |
| 387 | visit_tree (ir, propagate_precision_expr, &ctx); | |
| 323 | 388 | } |
| 324 | anyProgress |= res; | |
| 325 | } while (res); | |
| 326 | anyProgress |= res; | |
| 389 | anyProgress |= ctx.res; | |
| 390 | } while (ctx.res); | |
| 391 | anyProgress |= ctx.res; | |
| 327 | 392 | |
| 328 | 393 | // for globals that have undefined precision, set it to highp |
| 329 | 394 | if (assign_high_to_undefined) |
| r245594 | r245595 | |
|---|---|---|
| 47 | 47 | return ""; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | static const int tex_sampler_type_count = 7; | |
| 51 | // [glsl_sampler_dim] | |
| 52 | static const char* tex_sampler_dim_name[tex_sampler_type_count] = { | |
| 53 | "1D", "2D", "3D", "Cube", "Rect", "Buf", "External", | |
| 54 | }; | |
| 55 | static int tex_sampler_dim_size[tex_sampler_type_count] = { | |
| 56 | 1, 2, 3, 3, 2, 2, 2, | |
| 57 | }; | |
| 58 | ||
| 50 | 59 | struct ga_entry : public exec_node |
| 51 | 60 | { |
| 52 | 61 | ga_entry(ir_instruction* ir) |
| r245594 | r245595 | |
| 86 | 95 | , inside_loop_body(false) |
| 87 | 96 | , skipped_this_ir(false) |
| 88 | 97 | , previous_skipped(false) |
| 98 | , uses_texlod_impl(0) | |
| 99 | , uses_texlodproj_impl(0) | |
| 89 | 100 | { |
| 90 | 101 | indentation = 0; |
| 91 | 102 | expression_depth = 0; |
| r245594 | r245595 | |
| 145 | 156 | bool inside_loop_body; |
| 146 | 157 | bool skipped_this_ir; |
| 147 | 158 | bool previous_skipped; |
| 159 | int uses_texlod_impl; // 3 bits per tex_dimension, bit set for each precision if any texture sampler needs the GLES2 lod workaround. | |
| 160 | int uses_texlodproj_impl; // 3 bits per tex_dimension, bit set for each precision if any texture sampler needs the GLES2 lod workaround. | |
| 148 | 161 | }; |
| 149 | 162 | |
| 163 | static void print_texlod_workarounds(int usage_bitfield, int usage_proj_bitfield, string_buffer &str) | |
| 164 | { | |
| 165 | static const char *precStrings[3] = {"lowp", "mediump", "highp"}; | |
| 166 | static const char *precNameStrings[3] = { "low_", "medium_", "high_" }; | |
| 167 | // Print out the texlod workarounds | |
| 168 | for (int prec = 0; prec < 3; prec++) | |
| 169 | { | |
| 170 | const char *precString = precStrings[prec]; | |
| 171 | const char *precName = precNameStrings[prec]; | |
| 150 | 172 | |
| 173 | for (int dim = 0; dim < tex_sampler_type_count; dim++) | |
| 174 | { | |
| 175 | int mask = 1 << (dim + (prec * 8)); | |
| 176 | if (usage_bitfield & mask) | |
| 177 | { | |
| 178 | str.asprintf_append("%s vec4 impl_%stexture%sLodEXT(%s sampler%s sampler, highp vec%d coord, mediump float lod)\n", precString, precName, tex_sampler_dim_name[dim], precString, tex_sampler_dim_name[dim], tex_sampler_dim_size[dim]); | |
| 179 | str.asprintf_append("{\n"); | |
| 180 | str.asprintf_append("#if defined(GL_EXT_shader_texture_lod)\n"); | |
| 181 | str.asprintf_append("\treturn texture%sLodEXT(sampler, coord, lod);\n", tex_sampler_dim_name[dim]); | |
| 182 | str.asprintf_append("#else\n"); | |
| 183 | str.asprintf_append("\treturn texture%s(sampler, coord, lod);\n", tex_sampler_dim_name[dim]); | |
| 184 | str.asprintf_append("#endif\n"); | |
| 185 | str.asprintf_append("}\n\n"); | |
| 186 | } | |
| 187 | if (usage_proj_bitfield & mask) | |
| 188 | { | |
| 189 | // 2D projected read also has a vec4 UV variant | |
| 190 | if (dim == GLSL_SAMPLER_DIM_2D) | |
| 191 | { | |
| 192 | str.asprintf_append("%s vec4 impl_%stexture2DProjLodEXT(%s sampler2D sampler, highp vec4 coord, mediump float lod)\n", precString, precName, precString); | |
| 193 | str.asprintf_append("{\n"); | |
| 194 | str.asprintf_append("#if defined(GL_EXT_shader_texture_lod)\n"); | |
| 195 | str.asprintf_append("\treturn texture%sProjLodEXT(sampler, coord, lod);\n", tex_sampler_dim_name[dim]); | |
| 196 | str.asprintf_append("#else\n"); | |
| 197 | str.asprintf_append("\treturn texture%sProj(sampler, coord, lod);\n", tex_sampler_dim_name[dim]); | |
| 198 | str.asprintf_append("#endif\n"); | |
| 199 | str.asprintf_append("}\n\n"); | |
| 200 | } | |
| 201 | str.asprintf_append("%s vec4 impl_%stexture%sProjLodEXT(%s sampler%s sampler, highp vec%d coord, mediump float lod)\n", precString, precName, tex_sampler_dim_name[dim], precString, tex_sampler_dim_name[dim], tex_sampler_dim_size[dim] + 1); | |
| 202 | str.asprintf_append("{\n"); | |
| 203 | str.asprintf_append("#if defined(GL_EXT_shader_texture_lod)\n"); | |
| 204 | str.asprintf_append("\treturn texture%sProjLodEXT(sampler, coord, lod);\n", tex_sampler_dim_name[dim]); | |
| 205 | str.asprintf_append("#else\n"); | |
| 206 | str.asprintf_append("\treturn texture%sProj(sampler, coord, lod);\n", tex_sampler_dim_name[dim]); | |
| 207 | str.asprintf_append("#endif\n"); | |
| 208 | str.asprintf_append("}\n\n"); | |
| 209 | } | |
| 210 | } | |
| 211 | } | |
| 212 | } | |
| 213 | ||
| 214 | ||
| 151 | 215 | char* |
| 152 | 216 | _mesa_print_ir_glsl(exec_list *instructions, |
| 153 | 217 | struct _mesa_glsl_parse_state *state, |
| 154 | 218 | char* buffer, PrintGlslMode mode) |
| 155 | 219 | { |
| 156 | 220 | string_buffer str(buffer); |
| 221 | string_buffer body(buffer); | |
| 157 | 222 | |
| 158 | 223 | // print version & extensions |
| 159 | 224 | if (state) { |
| r245594 | r245595 | |
| 181 | 246 | } |
| 182 | 247 | if (state->EXT_shader_framebuffer_fetch_enable) |
| 183 | 248 | str.asprintf_append ("#extension GL_EXT_shader_framebuffer_fetch : enable\n"); |
| 249 | if (state->ARB_shader_bit_encoding_enable) | |
| 250 | str.asprintf_append("#extension GL_ARB_shader_bit_encoding : enable\n"); | |
| 184 | 251 | } |
| 185 | 252 | |
| 186 | 253 | // remove unused struct declarations |
| 187 | 254 | do_remove_unused_typedecls(instructions); |
| 188 | 255 | |
| 189 | 256 | global_print_tracker gtracker; |
| 257 | int uses_texlod_impl = 0; | |
| 258 | int uses_texlodproj_impl = 0; | |
| 190 | 259 | |
| 191 | 260 | loop_state* ls = analyze_loop_variables(instructions); |
| 192 | 261 | if (ls->loop_found) |
| r245594 | r245595 | |
| 201 | 270 | continue; |
| 202 | 271 | } |
| 203 | 272 | |
| 204 | ir_print_glsl_visitor v ( | |
| 273 | ir_print_glsl_visitor v (body, >racker, mode, state->es_shader, state); | |
| 205 | 274 | v.loopstate = ls; |
| 206 | 275 | |
| 207 | 276 | ir->accept(&v); |
| 208 | 277 | if (ir->ir_type != ir_type_function && !v.skipped_this_ir) |
| 209 | str.asprintf_append (";\n"); | |
| 278 | body.asprintf_append (";\n"); | |
| 279 | ||
| 280 | uses_texlod_impl |= v.uses_texlod_impl; | |
| 281 | uses_texlodproj_impl |= v.uses_texlodproj_impl; | |
| 210 | 282 | } |
| 211 | 283 | |
| 212 | 284 | delete ls; |
| 285 | ||
| 286 | print_texlod_workarounds(uses_texlod_impl, uses_texlodproj_impl, str); | |
| 287 | ||
| 288 | // Add the optimized glsl code | |
| 289 | str.asprintf_append("%s", body.c_str()); | |
| 213 | 290 | |
| 214 | 291 | return ralloc_strdup(buffer, str.c_str()); |
| 215 | 292 | } |
| r245594 | r245595 | |
| 280 | 357 | if (type && |
| 281 | 358 | !type->is_float() && |
| 282 | 359 | !type->is_sampler() && |
| 283 | (!type->is_array() || !type->element_type()->is_float()) | |
| 360 | !type->is_integer() && | |
| 361 | (!type->is_array() || !type->element_type()->is_float()) && | |
| 362 | (!type->is_array() || !type->element_type()->is_integer()) | |
| 284 | 363 | ) |
| 285 | 364 | { |
| 286 | 365 | return; |
| r245594 | r245595 | |
| 297 | 376 | { |
| 298 | 377 | prec = glsl_precision_high; |
| 299 | 378 | } |
| 379 | if (type && type->is_integer()) | |
| 380 | { | |
| 381 | if (prec == glsl_precision_undefined && type && type->is_integer()) | |
| 382 | { | |
| 383 | // Default to highp on integers | |
| 384 | prec = glsl_precision_high; | |
| 385 | } | |
| 386 | } | |
| 300 | 387 | |
| 301 | 388 | // skip precision for samplers that end up being lowp (default anyway) or undefined; |
| 302 | 389 | // except always emit it for shadowmap samplers (some drivers don't implement |
| r245594 | r245595 | |
| 529 | 616 | "float", // u2f |
| 530 | 617 | "int", // i2u |
| 531 | 618 | "int", // u2i |
| 532 | "float", // bit i2f | |
| 533 | "int", // bit f2i | |
| 534 | "float", // bit u2f | |
| 535 | "int", // bit f2u | |
| 619 | "intBitsToFloat", // bit i2f | |
| 620 | "floatBitsToInt", // bit f2i | |
| 621 | "uintBitsToFloat", // bit u2f | |
| 622 | "floatBitsToUint", // bit f2u | |
| 536 | 623 | "any", |
| 537 | 624 | "trunc", |
| 538 | 625 | "ceil", |
| r245594 | r245595 | |
| 644 | 731 | newline_indent(); |
| 645 | 732 | |
| 646 | 733 | if (ir->get_num_operands() == 1) { |
| 647 | if (ir->operation >= ir_unop_f2i && ir->operation < ir_unop_ | |
| 734 | if (ir->operation >= ir_unop_f2i && ir->operation <= ir_unop_u2i) { | |
| 648 | 735 | print_type(buffer, ir->type, true); |
| 649 | 736 | buffer.asprintf_append ("("); |
| 650 | 737 | } else if (ir->operation == ir_unop_rcp) { |
| r245594 | r245595 | |
| 723 | 810 | --this->expression_depth; |
| 724 | 811 | } |
| 725 | 812 | |
| 726 | // [glsl_sampler_dim] | |
| 727 | static const char* tex_sampler_dim_name[] = { | |
| 728 | "1D", "2D", "3D", "Cube", "Rect", "Buf", "External", | |
| 729 | }; | |
| 730 | static int tex_sampler_dim_size[] = { | |
| 731 | 1, 2, 3, 3, 2, 2, 2, | |
| 732 | }; | |
| 733 | ||
| 734 | 813 | void ir_print_glsl_visitor::visit(ir_texture *ir) |
| 735 | 814 | { |
| 736 | 815 | glsl_sampler_dim sampler_dim = (glsl_sampler_dim)ir->sampler->type->sampler_dimensionality; |
| r245594 | r245595 | |
| 741 | 820 | if (is_shadow) |
| 742 | 821 | sampler_uv_dim += 1; |
| 743 | 822 | const bool is_proj = (uv_dim > sampler_uv_dim); |
| 823 | const bool is_lod = (ir->op == ir_txl); | |
| 744 | 824 | |
| 825 | if (is_lod && state->es_shader && state->language_version < 300 && state->stage == MESA_SHADER_FRAGMENT) | |
| 826 | { | |
| 827 | // Special workaround for GLES 2.0 LOD samplers to prevent a lot of debug spew. | |
| 828 | const glsl_precision prec = ir->sampler->get_precision(); | |
| 829 | const char *precString = ""; | |
| 830 | // Sampler bitfield is 7 bits, so use 0-7 for lowp, 8-15 for mediump and 16-23 for highp. | |
| 831 | int position = (int)sampler_dim; | |
| 832 | switch (prec) | |
| 833 | { | |
| 834 | case glsl_precision_high: | |
| 835 | position += 16; | |
| 836 | precString = "_high_"; | |
| 837 | break; | |
| 838 | case glsl_precision_medium: | |
| 839 | position += 8; | |
| 840 | precString = "_medium_"; | |
| 841 | break; | |
| 842 | case glsl_precision_low: | |
| 843 | default: | |
| 844 | precString = "_low_"; | |
| 845 | break; | |
| 846 | } | |
| 847 | buffer.asprintf_append("impl%s", precString); | |
| 848 | if (is_proj) | |
| 849 | uses_texlodproj_impl |= (1 << position); | |
| 850 | else | |
| 851 | uses_texlod_impl |= (1 << position); | |
| 852 | } | |
| 853 | ||
| 854 | ||
| 745 | 855 | // texture function name |
| 746 | 856 | //ACS: shadow lookups and lookups with dimensionality included in the name were deprecated in 130 |
| 747 | 857 | if(state->language_version<130) |
| r245594 | r245595 | |
| 792 | 902 | // texture coordinate |
| 793 | 903 | ir->coordinate->accept(this); |
| 794 | 904 | |
| 795 | // lod bias | |
| 796 | if (ir->op == ir_txb) | |
| 797 | { | |
| 798 | buffer.asprintf_append (", "); | |
| 799 | ir->lod_info.bias->accept(this); | |
| 800 | } | |
| 801 | ||
| 802 | 905 | // lod |
| 803 | 906 | if (ir->op == ir_txl || ir->op == ir_txf) |
| 804 | 907 | { |
| r245594 | r245595 | |
| 814 | 917 | buffer.asprintf_append (", "); |
| 815 | 918 | ir->lod_info.grad.dPdy->accept(this); |
| 816 | 919 | } |
| 920 | ||
| 921 | // texel offset | |
| 922 | if (ir->offset != NULL) | |
| 923 | { | |
| 924 | buffer.asprintf_append (", "); | |
| 925 | ir->offset->accept(this); | |
| 926 | } | |
| 817 | 927 | |
| 818 | if (ir->offset != NULL) { | |
| 819 | buffer.asprintf_append (", "); | |
| 820 | ir->offset->accept(this); | |
| 821 | } | |
| 928 | // lod bias | |
| 929 | if (ir->op == ir_txb) | |
| 930 | { | |
| 931 | buffer.asprintf_append (", "); | |
| 932 | ir->lod_info.bias->accept(this); | |
| 933 | } | |
| 934 | ||
| 822 | 935 | /* |
| 823 | 936 | |
| 824 | 937 | |
| r245594 | r245595 | |
| 889 | 1002 | } |
| 890 | 1003 | return; |
| 891 | 1004 | } |
| 1005 | ||
| 1006 | // Swizzling scalar types is not allowed so just return now. | |
| 1007 | if (ir->val->type->vector_elements == 1) | |
| 1008 | return; | |
| 892 | 1009 | |
| 893 | 1010 | buffer.asprintf_append ("."); |
| 894 | 1011 | for (unsigned i = 0; i < ir->mask.num_components; i++) { |
| r245594 | r245595 | |
| 1140 | 1257 | emit_assignment_part (ir->lhs, ir->rhs, ir->write_mask, NULL); |
| 1141 | 1258 | } |
| 1142 | 1259 | |
| 1143 | static void print_float (string_buffer& buffer, float f) | |
| 1260 | ||
| 1261 | #ifdef _MSC_VER | |
| 1262 | #define isnan(x) _isnan(x) | |
| 1263 | #define isinf(x) (!_finite(x)) | |
| 1264 | #endif | |
| 1265 | ||
| 1266 | #define fpcheck(x) (isnan(x) || isinf(x)) | |
| 1267 | ||
| 1268 | void print_float (string_buffer& buffer, float f) | |
| 1144 | 1269 | { |
| 1145 | 1270 | // Kind of roundabout way, but this is to satisfy two things: |
| 1146 | 1271 | // * MSVC and gcc-based compilers differ a bit in how they treat float |
| r245594 | r245595 | |
| 1148 | 1273 | // * GLSL (early version at least) require floats to have ".0" or |
| 1149 | 1274 | // exponential notation. |
| 1150 | 1275 | char tmp[64]; |
| 1151 | snprintf(tmp, 64, "%. | |
| 1276 | snprintf(tmp, 64, "%.7g", f); | |
| 1152 | 1277 | |
| 1153 | 1278 | char* posE = NULL; |
| 1154 | 1279 | posE = strchr(tmp, 'e'); |
| r245594 | r245595 | |
| 1198 | 1323 | |
| 1199 | 1324 | if (type == glsl_type::float_type) |
| 1200 | 1325 | { |
| 1326 | if (fpcheck(ir->value.f[0])) | |
| 1327 | { | |
| 1328 | // Non-printable float. If we have bit conversions, we're fine. otherwise do hand-wavey things in print_float(). | |
| 1329 | if ((state->es_shader && (state->language_version >= 300)) | |
| 1330 | || (state->language_version >= 330) | |
| 1331 | || (state->ARB_shader_bit_encoding_enable)) | |
| 1332 | { | |
| 1333 | buffer.asprintf_append("uintBitsToFloat(%uu)", ir->value.u[0]); | |
| 1334 | return; | |
| 1335 | } | |
| 1336 | } | |
| 1337 | ||
| 1201 | 1338 | print_float (buffer, ir->value.f[0]); |
| 1202 | 1339 | return; |
| 1203 | 1340 | } |
| 1204 | 1341 | else if (type == glsl_type::int_type) |
| 1205 | 1342 | { |
| 1206 | buffer.asprintf_append ("%d", ir->value.i[0]); | |
| 1343 | // Need special handling for INT_MIN | |
| 1344 | if (ir->value.u[0] == 0x80000000) | |
| 1345 | buffer.asprintf_append("int(0x%X)", ir->value.i[0]); | |
| 1346 | else | |
| 1347 | buffer.asprintf_append ("%d", ir->value.i[0]); | |
| 1207 | 1348 | return; |
| 1208 | 1349 | } |
| 1209 | 1350 | else if (type == glsl_type::uint_type) |
| r245594 | r245595 | |
| 1213 | 1354 | || (state->language_version < 130)) |
| 1214 | 1355 | buffer.asprintf_append("%u", ir->value.u[0]); |
| 1215 | 1356 | else |
| 1216 | buffer.asprintf_append("%uu", ir->value.u[0]); | |
| 1357 | { | |
| 1358 | // Old Adreno drivers try to be smart with '0u' and treat that as 'const int'. Sigh. | |
| 1359 | if (ir->value.u[0] == 0) | |
| 1360 | buffer.asprintf_append("uint(0)"); | |
| 1361 | else | |
| 1362 | buffer.asprintf_append("%uu", ir->value.u[0]); | |
| 1363 | } | |
| 1217 | 1364 | return; |
| 1218 | 1365 | } |
| 1219 | 1366 | |
| r245594 | r245595 | |
| 1254 | 1401 | buffer.asprintf_append("%uu", ir->value.u[i]); |
| 1255 | 1402 | break; |
| 1256 | 1403 | } |
| 1257 | case GLSL_TYPE_INT: buffer.asprintf_append ("%d", ir->value.i[i]); break; | |
| 1404 | case GLSL_TYPE_INT: | |
| 1405 | { | |
| 1406 | // Need special handling for INT_MIN | |
| 1407 | if (ir->value.u[i] == 0x80000000) | |
| 1408 | buffer.asprintf_append("int(0x%X)", ir->value.i[i]); | |
| 1409 | else | |
| 1410 | buffer.asprintf_append("%d", ir->value.i[i]); | |
| 1411 | break; | |
| 1412 | } | |
| 1258 | 1413 | case GLSL_TYPE_FLOAT: print_float(buffer, ir->value.f[i]); break; |
| 1259 | 1414 | case GLSL_TYPE_BOOL: buffer.asprintf_append ("%d", ir->value.b[i]); break; |
| 1260 | 1415 | default: assert(0); |
| r245594 | r245595 | |
| 1406 | 1561 | if (indvar->initial_value) |
| 1407 | 1562 | { |
| 1408 | 1563 | buffer.asprintf_append (" = "); |
| 1564 | // if the var is an array add the proper initializer | |
| 1565 | if(var->type->is_vector()) | |
| 1566 | { | |
| 1567 | print_type(buffer, var->type, false); | |
| 1568 | buffer.asprintf_append ("("); | |
| 1569 | } | |
| 1409 | 1570 | indvar->initial_value->accept(this); |
| 1571 | if(var->type->is_vector()) | |
| 1572 | { | |
| 1573 | buffer.asprintf_append (")"); | |
| 1574 | } | |
| 1410 | 1575 | } |
| 1411 | 1576 | } |
| 1412 | 1577 | } |
| r245594 | r245595 | |
|---|---|---|
| 99 | 99 | }; |
| 100 | 100 | |
| 101 | 101 | |
| 102 | extern void print_float (string_buffer& buffer, float f); | |
| 103 | ||
| 104 | ||
| 102 | 105 | #endif /* IR_PRINT_GLSL_VISITOR_H */ |
| r245594 | r245595 | |
|---|---|---|
| 179 | 179 | virtual void visit(ir_end_primitive *); |
| 180 | 180 | |
| 181 | 181 | void emit_assignment_part (ir_dereference* lhs, ir_rvalue* rhs, unsigned write_mask, ir_rvalue* dstIndex); |
| 182 | bool can_emit_canonical_for (loop_variable_state *ls); | |
| 182 | 183 | bool emit_canonical_for (ir_loop* ir); |
| 183 | 184 | |
| 184 | 185 | metal_print_context& ctx; |
| r245594 | r245595 | |
| 374 | 375 | |
| 375 | 376 | void ir_print_metal_visitor::print_var_name (ir_variable* v) |
| 376 | 377 | { |
| 377 | | |
| 378 | long id = (long)hash_table_find (globals->var_hash, v); | |
| 378 | 379 | if (!id && v->data.mode == ir_var_temporary) |
| 379 | 380 | { |
| 380 | 381 | id = ++globals->var_counter; |
| r245594 | r245595 | |
| 543 | 544 | // give an id to any variable defined in a function that is not an uniform |
| 544 | 545 | if ((this->mode == kPrintGlslNone && ir->data.mode != ir_var_uniform)) |
| 545 | 546 | { |
| 546 | | |
| 547 | long id = (long)hash_table_find (globals->var_hash, ir); | |
| 547 | 548 | if (id == 0) |
| 548 | 549 | { |
| 549 | 550 | id = ++globals->var_counter; |
| r245594 | r245595 | |
| 565 | 566 | if (!inside_loop_body) |
| 566 | 567 | { |
| 567 | 568 | loop_variable_state* inductor_state = loopstate->get_for_inductor(ir); |
| 568 | if (inductor_state && inductor_state->private_induction_variable_count == 1) | |
| 569 | if (inductor_state && inductor_state->private_induction_variable_count == 1 && | |
| 570 | can_emit_canonical_for(inductor_state)) | |
| 569 | 571 | { |
| 570 | 572 | skipped_this_ir = true; |
| 571 | 573 | return; |
| r245594 | r245595 | |
| 801 | 803 | "float", // u2f |
| 802 | 804 | "int", // i2u |
| 803 | 805 | "int", // u2i |
| 804 | "float", // bit i2f | |
| 805 | "int", // bit f2i | |
| 806 | "float", // bit u2f | |
| 807 | "int", // bit f2u | |
| 806 | "as_type_", // bit i2f | |
| 807 | "as_type_", // bit f2i | |
| 808 | "as_type_", // bit u2f | |
| 809 | "as_type_", // bit f2u | |
| 808 | 810 | "any", |
| 809 | 811 | "trunc", |
| 810 | 812 | "ceil", |
| r245594 | r245595 | |
| 847 | 849 | "/", |
| 848 | 850 | "carry_TODO", |
| 849 | 851 | "borrow_TODO", |
| 850 | "mod", | |
| 852 | "fmod", | |
| 851 | 853 | "<", |
| 852 | 854 | ">", |
| 853 | 855 | "<=", |
| r245594 | r245595 | |
| 965 | 967 | { |
| 966 | 968 | if (op0cast) |
| 967 | 969 | print_cast (buffer, arg_prec, ir->operands[0]); |
| 968 | if (ir->operation >= ir_unop_f2i && ir->operation < ir_unop_ | |
| 970 | if (ir->operation >= ir_unop_f2i && ir->operation <= ir_unop_u2i) { | |
| 969 | 971 | print_type(buffer, ir, ir->type, true); |
| 970 | 972 | buffer.asprintf_append ("("); |
| 973 | } else if (ir->operation >= ir_unop_bitcast_i2f && ir->operation <= ir_unop_bitcast_f2u) { | |
| 974 | buffer.asprintf_append("as_type<"); | |
| 975 | print_type(buffer, ir, ir->type, true); | |
| 976 | buffer.asprintf_append(">("); | |
| 971 | 977 | } else if (ir->operation == ir_unop_rcp) { |
| 972 | buffer.asprintf_append ("(1.0/("); | |
| 978 | const bool halfCast = (arg_prec == glsl_precision_medium || arg_prec == glsl_precision_low); | |
| 979 | buffer.asprintf_append (halfCast ? "((half)1.0/(" : "(1.0/("); | |
| 973 | 980 | } else { |
| 974 | 981 | buffer.asprintf_append ("%s(", operator_glsl_strs[ir->operation]); |
| 975 | 982 | } |
| r245594 | r245595 | |
| 1445 | 1452 | if (!ir->condition && whole_var) |
| 1446 | 1453 | { |
| 1447 | 1454 | loop_variable_state* inductor_state = loopstate->get_for_inductor(whole_var); |
| 1448 | if (inductor_state && inductor_state->private_induction_variable_count == 1) | |
| 1455 | if (inductor_state && inductor_state->private_induction_variable_count == 1 && | |
| 1456 | can_emit_canonical_for(inductor_state)) | |
| 1449 | 1457 | { |
| 1450 | 1458 | skipped_this_ir = true; |
| 1451 | 1459 | return; |
| r245594 | r245595 | |
| 1501 | 1509 | emit_assignment_part (ir->lhs, ir->rhs, ir->write_mask, NULL); |
| 1502 | 1510 | } |
| 1503 | 1511 | |
| 1504 | static void print_float (string_buffer& buffer, float f) | |
| 1505 | { | |
| 1506 | // Kind of roundabout way, but this is to satisfy two things: | |
| 1507 | // * MSVC and gcc-based compilers differ a bit in how they treat float | |
| 1508 | // widht/precision specifiers. Want to match for tests. | |
| 1509 | // * GLSL (early version at least) require floats to have ".0" or | |
| 1510 | // exponential notation. | |
| 1511 | char tmp[64]; | |
| 1512 | snprintf(tmp, 64, "%.6g", f); | |
| 1513 | ||
| 1514 | char* posE = NULL; | |
| 1515 | posE = strchr(tmp, 'e'); | |
| 1516 | if (!posE) | |
| 1517 | posE = strchr(tmp, 'E'); | |
| 1518 | ||
| 1519 | #if defined(_MSC_VER) | |
| 1520 | // While gcc would print something like 1.0e+07, MSVC will print 1.0e+007 - | |
| 1521 | // only for exponential notation, it seems, will add one extra useless zero. Let's try to remove | |
| 1522 | // that so compiler output matches. | |
| 1523 | if (posE != NULL) | |
| 1524 | { | |
| 1525 | if((posE[1] == '+' || posE[1] == '-') && posE[2] == '0') | |
| 1526 | { | |
| 1527 | char* p = posE+2; | |
| 1528 | while (p[0]) | |
| 1529 | { | |
| 1530 | p[0] = p[1]; | |
| 1531 | ++p; | |
| 1532 | } | |
| 1533 | } | |
| 1534 | } | |
| 1535 | #endif | |
| 1536 | ||
| 1537 | buffer.asprintf_append ("%s", tmp); | |
| 1538 | ||
| 1539 | // need to append ".0"? | |
| 1540 | if (!strchr(tmp,'.') && (posE == NULL)) | |
| 1541 | buffer.asprintf_append(".0"); | |
| 1542 | } | |
| 1543 | ||
| 1544 | 1512 | void ir_print_metal_visitor::visit(ir_constant *ir) |
| 1545 | 1513 | { |
| 1546 | 1514 | const glsl_type* type = ir->type; |
| r245594 | r245595 | |
| 1715 | 1683 | } |
| 1716 | 1684 | |
| 1717 | 1685 | |
| 1718 | bool ir_print_metal_visitor::emit_canonical_for ( | |
| 1686 | bool ir_print_metal_visitor::can_emit_canonical_for (loop_variable_state *ls) | |
| 1719 | 1687 | { |
| 1720 | loop_variable_state* const ls = this->loopstate->get(ir); | |
| 1721 | 1688 | if (ls == NULL) |
| 1722 | 1689 | return false; |
| 1723 | 1690 | |
| r245594 | r245595 | |
| 1732 | 1699 | if (terminatorCount != 1) |
| 1733 | 1700 | return false; |
| 1734 | 1701 | |
| 1702 | return true; | |
| 1703 | } | |
| 1704 | ||
| 1705 | bool ir_print_metal_visitor::emit_canonical_for (ir_loop* ir) | |
| 1706 | { | |
| 1707 | loop_variable_state* const ls = this->loopstate->get(ir); | |
| 1708 | ||
| 1709 | if (!can_emit_canonical_for(ls)) | |
| 1710 | return false; | |
| 1711 | ||
| 1735 | 1712 | hash_table* terminator_hash = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); |
| 1736 | 1713 | hash_table* induction_hash = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); |
| 1737 | 1714 |
| r245594 | r245595 | |
|---|---|---|
| 2531 | 2531 | } |
| 2532 | 2532 | |
| 2533 | 2533 | prog->ARB_fragment_coord_conventions_enable |= |
| 2534 | | |
| 2534 | prog->Shaders[i]->ARB_fragment_coord_conventions_enable; | |
| 2535 | 2535 | |
| 2536 | 2536 | gl_shader_stage shader_type = prog->Shaders[i]->Stage; |
| 2537 | 2537 | shader_list[shader_type][num_shaders[shader_type]] = prog->Shaders[i]; |
| r245594 | r245595 | |
|---|---|---|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | void |
| 124 | loop_state::insert_inductor( | |
| 124 | loop_state::insert_inductor(loop_variable* loopvar, loop_variable_state* state, ir_loop* loop) | |
| 125 | 125 | { |
| 126 | ir_variable* var = loopvar->var; | |
| 127 | ||
| 126 | 128 | // Check if this variable is already marked as "sure can't be a private inductor variable" |
| 127 | 129 | if (hash_table_find(this->ht_non_inductors, var)) |
| 128 | 130 | return; |
| r245594 | r245595 | |
| 144 | 146 | return; |
| 145 | 147 | } |
| 146 | 148 | } |
| 149 | ||
| 150 | // Check if this variable is used before the loop anywhere. If it is, it can't be a | |
| 151 | // variable that's private to the loop. | |
| 152 | // Skip over the IR that declared the variable or assigned the initial value though. | |
| 153 | for (exec_node* node = loop->prev; | |
| 154 | !node->is_head_sentinel(); | |
| 155 | node = node->prev) | |
| 156 | { | |
| 157 | ir_instruction *ir = (ir_instruction *) node; | |
| 158 | if (ir == loopvar->initial_value_ir) | |
| 159 | continue; | |
| 160 | if (ir->ir_type == ir_type_variable) | |
| 161 | continue; | |
| 162 | ||
| 163 | ir->accept (&refs); | |
| 164 | if (refs.find_variable_entry(var)) | |
| 165 | { | |
| 166 | // add to list of "non inductors", so that next loop does not try | |
| 167 | // to add it as inductor again | |
| 168 | hash_table_insert(this->ht_non_inductors, state, var); | |
| 169 | return; | |
| 170 | } | |
| 171 | } | |
| 147 | 172 | |
| 148 | 173 | state->private_induction_variable_count++; |
| 149 | 174 | hash_table_insert(this->ht_inductors, state, var); |
| r245594 | r245595 | |
| 345 | 370 | foreach_in_list_safe(loop_variable, lv, &ls->variables) { |
| 346 | 371 | ir_variable *var = lv->var; |
| 347 | 372 | if (var != NULL) { |
| 348 | lv->initial_value = find_initial_value(ir, var); | |
| 373 | lv->initial_value = find_initial_value(ir, var, &lv->initial_value_ir); | |
| 349 | 374 | } |
| 350 | 375 | /* Move variables that are already marked as being loop constant to |
| 351 | 376 | * a separate list. These trivially don't need to be tested. |
| r245594 | r245595 | |
| 430 | 455 | |
| 431 | 456 | lv->remove(); |
| 432 | 457 | ls->induction_variables.push_tail(lv); |
| 433 | loops->insert_inductor(lv | |
| 458 | loops->insert_inductor(lv, ls, ir); | |
| 434 | 459 | } |
| 435 | 460 | } |
| 436 | 461 |
| r245594 | r245595 | |
|---|---|---|
| 58 | 58 | const struct gl_shader_compiler_options *options); |
| 59 | 59 | |
| 60 | 60 | ir_rvalue * |
| 61 | find_initial_value(ir_loop *loop, ir_variable *var); | |
| 61 | find_initial_value(ir_loop *loop, ir_variable *var, ir_instruction **out_containing_ir); | |
| 62 | 62 | |
| 63 | 63 | int |
| 64 | 64 | calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment, |
| r245594 | r245595 | |
| 168 | 168 | |
| 169 | 169 | /** Reference to initial value outside of the loop. */ |
| 170 | 170 | ir_rvalue *initial_value; |
| 171 | /** IR that assigned the initial value. */ | |
| 172 | ir_instruction *initial_value_ir; | |
| 171 | 173 | |
| 172 | 174 | /** Number of assignments to the variable in the loop body. */ |
| 173 | 175 | unsigned num_assignments; |
| r245594 | r245595 | |
| 247 | 249 | loop_variable_state *insert(ir_loop *ir); |
| 248 | 250 | |
| 249 | 251 | loop_variable_state* get_for_inductor (const ir_variable*); |
| 250 | void insert_inductor( | |
| 252 | void insert_inductor(loop_variable* loopvar, loop_variable_state* state, ir_loop* loop); | |
| 251 | 253 | |
| 252 | 254 | bool loop_found; |
| 253 | 255 |
| r245594 | r245595 | |
|---|---|---|
| 44 | 44 | * \c NULL if no initializer can be found. |
| 45 | 45 | */ |
| 46 | 46 | ir_rvalue * |
| 47 | find_initial_value(ir_loop *loop, ir_variable *var) | |
| 47 | find_initial_value(ir_loop *loop, ir_variable *var, ir_instruction **out_containing_ir) | |
| 48 | 48 | { |
| 49 | *out_containing_ir = NULL; | |
| 49 | 50 | ir_variable_refcount_visitor refs; |
| 50 | 51 | |
| 51 | 52 | for (exec_node *node = loop->prev; |
| r245594 | r245595 | |
| 74 | 75 | ir_variable *assignee = assign->lhs->whole_variable_referenced(); |
| 75 | 76 | |
| 76 | 77 | if (assignee == var) |
| 78 | { | |
| 79 | *out_containing_ir = assign; | |
| 77 | 80 | return (assign->condition != NULL) ? NULL : assign->rhs; |
| 81 | } | |
| 78 | 82 | |
| 79 | 83 | break; |
| 80 | 84 | } |
| r245594 | r245595 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | static int glsl_version = 330; |
| 42 | 42 | |
| 43 | extern "C" void | |
| 44 | _mesa_error_no_memory(const char *caller) | |
| 45 | { | |
| 46 | fprintf(stderr, "Mesa error: out of memory in %s", caller); | |
| 47 | } | |
| 43 | //extern "C" void | |
| 44 | //_mesa_error_no_memory(const char *caller) | |
| 45 | //{ | |
| 46 | // fprintf(stderr, "Mesa error: out of memory in %s", caller); | |
| 47 | //} | |
| 48 | 48 | |
| 49 | 49 | static void |
| 50 | 50 | initialize_context(struct gl_context *ctx, gl_api api) |
| r245594 | r245595 | |
|---|---|---|
| 129 | 129 | return false; |
| 130 | 130 | |
| 131 | 131 | unsigned component = 0; |
| 132 | for ( | |
| 132 | for (int c = 0; c < ir->type->vector_elements; c++) { | |
| 133 | 133 | if (ir->get_float_component(c) < 1.0f) |
| 134 | 134 | component++; |
| 135 | 135 | } |
| r245594 | r245595 | |
| 144 | 144 | return false; |
| 145 | 145 | |
| 146 | 146 | unsigned component = 0; |
| 147 | for ( | |
| 147 | for (int c = 0; c < ir->type->vector_elements; c++) { | |
| 148 | 148 | if (ir->get_float_component(c) > 0.0f) |
| 149 | 149 | component++; |
| 150 | 150 | } |
| r245594 | r245595 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | void |
| 39 | _mesa_reference_shader(struct gl_context * | |
| 39 | _mesa_reference_shader(struct gl_context *, struct gl_shader **ptr, | |
| 40 | 40 | struct gl_shader *sh) |
| 41 | 41 | { |
| 42 | (void) ctx; | |
| 43 | 42 | *ptr = sh; |
| 44 | 43 | } |
| 45 | 44 |
| r245594 | r245595 | |
|---|---|---|
| 7 | 7 | 'target_name': 'glsl_optimizer_lib', |
| 8 | 8 | 'type': 'static_library', |
| 9 | 9 | 'include_dirs': [ |
| 10 | '.', | |
| 10 | 11 | 'glsl', |
| 11 | 12 | 'mesa', |
| 12 | 13 | '../include', |
| r245594 | r245595 | |
| 138 | 139 | 'glsl/opt_flip_matrices.cpp', |
| 139 | 140 | 'glsl/opt_dead_builtin_varyings.cpp', |
| 140 | 141 | 'glsl/program.h', |
| 141 | 'glsl/ralloc.c', | |
| 142 | 'glsl/ralloc.h', | |
| 143 | 142 | 'glsl/s_expression.cpp', |
| 144 | 143 | 'glsl/s_expression.h', |
| 145 | 144 | 'glsl/standalone_scaffolding.cpp', |
| r245594 | r245595 | |
| 153 | 152 | 'mesa/main/dd.h', |
| 154 | 153 | 'mesa/main/glheader.h', |
| 155 | 154 | 'mesa/main/glminimal.h', |
| 156 | 'mesa/main/hash_table.c', | |
| 157 | 'mesa/main/hash_table.h', | |
| 158 | 155 | 'mesa/main/imports.c', |
| 159 | 156 | 'mesa/main/imports.h', |
| 160 | 157 | 'mesa/main/macros.h', |
| r245594 | r245595 | |
| 167 | 164 | 'mesa/program/prog_statevars.h', |
| 168 | 165 | 'mesa/program/symbol_table.c', |
| 169 | 166 | 'mesa/program/symbol_table.h', |
| 167 | 'util/hash_table.c', | |
| 168 | 'util/hash_table.h', | |
| 169 | 'util/ralloc.c', | |
| 170 | 'util/ralloc.h', | |
| 170 | 171 | ], |
| 171 | 172 | 'conditions': [ |
| 172 | 173 | ['OS=="win"', { |
| 173 | 174 | 'include_dirs': [ |
| 174 | '../include/c99', | |
| 175 | '../include/c99', | |
| 175 | 176 | ], |
| 176 | 177 | 'defines': [ |
| 177 | 178 | '_LIB', |
| r245594 | r245595 | |
| 184 | 185 | ], |
| 185 | 186 | 'msvs_disabled_warnings': [4028, 4244, 4267, 4996], |
| 186 | 187 | }], |
| 187 | ], | |
| 188 | ], | |
| 188 | 189 | } |
| 189 | 190 | ] |
| 190 | } | |
| No newline at end of file | ||
| 191 | } |
| r245594 | r245595 | |
|---|---|---|
| 248 | 248 | #endif |
| 249 | 249 | |
| 250 | 250 | #ifndef M_PI_2 |
| 251 | #define M_PI_2 1.57079632679489661923 | |
| 251 | #define M_PI_2 (1.57079632679489661923) | |
| 252 | 252 | #endif |
| 253 | 253 | |
| 254 | 254 | #ifndef M_PI_4 |
| 255 | #define M_PI_4 0.7853981633974483096 | |
| 255 | #define M_PI_4 (0.785398163397448309616) | |
| 256 | 256 | #endif |
| 257 | 257 | |
| 258 | 258 | #ifndef M_E |
| r245594 | r245595 | |
|---|---|---|
| 2 | 2 | { |
| 3 | 3 | vec4 c_1; |
| 4 | 4 | c_1.zw = vec2(0.0, 0.0); |
| 5 | c_1.xy = vec2(-0.34413, 0.050045); | |
| 5 | c_1.xy = vec2(-0.3441301, 0.05004501); | |
| 6 | 6 | gl_FragData[0] = c_1; |
| 7 | 7 | } |
| 8 | 8 |
| r245594 | r245595 | |
|---|---|---|
| 2 | 2 | { |
| 3 | 3 | mediump vec4 c_1; |
| 4 | 4 | c_1.zw = vec2(0.0, 0.0); |
| 5 | c_1.xy = vec2(-0.34413, 0.050045); | |
| 5 | c_1.xy = vec2(-0.3441301, 0.05004501); | |
| 6 | 6 | gl_FragData[0] = c_1; |
| 7 | 7 | } |
| 8 | 8 |
| r245594 | r245595 | |
|---|---|---|
| 4 | 4 | { |
| 5 | 5 | mediump vec4 c_1; |
| 6 | 6 | c_1.zw = vec2(0.0, 0.0); |
| 7 | c_1.xy = vec2(-0.34413, 0.050045); | |
| 7 | c_1.xy = vec2(-0.3441301, 0.05004501); | |
| 8 | 8 | _fragData = c_1; |
| 9 | 9 | } |
| 10 | 10 |
| r245594 | r245595 | |
|---|---|---|
| 12 | 12 | xlatMtlShaderOutput _mtl_o; |
| 13 | 13 | half4 c_1; |
| 14 | 14 | c_1.zw = half2(float2(0.0, 0.0)); |
| 15 | c_1.xy = half2(float2(-0.34413, 0.050045)); | |
| 15 | c_1.xy = half2(float2(-0.3441301, 0.05004501)); | |
| 16 | 16 | _mtl_o._fragData = c_1; |
| 17 | 17 | return _mtl_o; |
| 18 | 18 | } |
| r245594 | r245595 | |
|---|---|---|
| 2 | 2 | { |
| 3 | 3 | vec4 c_1; |
| 4 | 4 | c_1.zw = vec2(0.0, 0.0); |
| 5 | c_1.xy = vec2(-0.34413, 0.050045); | |
| 5 | c_1.xy = vec2(-0.3441301, 0.05004501); | |
| 6 | 6 | gl_FragData[0] = c_1; |
| 7 | 7 | } |
| 8 | 8 |
| r245594 | r245595 | |
|---|---|---|
| 2 | 2 | { |
| 3 | 3 | mediump vec4 c_1; |
| 4 | 4 | c_1.zw = vec2(0.0, 0.0); |
| 5 | c_1.xy = vec2(-0.34413, 0.050045); | |
| 5 | c_1.xy = vec2(-0.3441301, 0.05004501); | |
| 6 | 6 | gl_FragData[0] = c_1; |
| 7 | 7 | } |
| 8 | 8 |
| r245594 | r245595 | |
|---|---|---|
| 4 | 4 | { |
| 5 | 5 | mediump vec4 c_1; |
| 6 | 6 | c_1.zw = vec2(0.0, 0.0); |
| 7 | c_1.xy = vec2(-0.34413, 0.050045); | |
| 7 | c_1.xy = vec2(-0.3441301, 0.05004501); | |
| 8 | 8 | _fragData = c_1; |
| 9 | 9 | } |
| 10 | 10 |
| r245594 | r245595 | |
|---|---|---|
| 12 | 12 | xlatMtlShaderOutput _mtl_o; |
| 13 | 13 | half4 c_1; |
| 14 | 14 | c_1.zw = half2(float2(0.0, 0.0)); |
| 15 | c_1.xy = half2(float2(-0.34413, 0.050045)); | |
| 15 | c_1.xy = half2(float2(-0.3441301, 0.05004501)); | |
| 16 | 16 | _mtl_o._fragData = c_1; |
| 17 | 17 | return _mtl_o; |
| 18 | 18 | } |
| r245594 | r245595 | |
|---|---|---|
| 7 | 7 | discard; |
| 8 | 8 | }; |
| 9 | 9 | a_2 = 4.0; |
| 10 | for (int i_1 = 0; i_1 < 10; i_1++, a_2 += 1.0) { | |
| 10 | for (highp int i_1 = 0; i_1 < 10; i_1++, a_2 += 1.0) { | |
| 11 | 11 | }; |
| 12 | 12 | while (true) { |
| 13 | 13 | a_2 += 2.0; |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | ||
| 3 | // from case 685794 at Unity; a particular form of a loop | |
| 4 | // started to generate invalid shaders around Unity 4.6.3. | |
| 5 | ||
| 6 | out mediump vec4 _fragData; | |
| 7 | ||
| 8 | ||
| 9 | struct v2f_surf { | |
| 10 | mediump vec2 uv; | |
| 11 | highp vec4 pos; | |
| 12 | }; | |
| 13 | uniform sampler2D _MainTex; | |
| 14 | uniform mediump float _NumPasses; | |
| 15 | uniform mediump vec4 _ContrastShift; | |
| 16 | uniform mediump vec4 _SaturationShift; | |
| 17 | uniform lowp vec4 _HueShift; | |
| 18 | uniform lowp vec4 _LuminosityShift; | |
| 19 | ||
| 20 | lowp vec3 TestCycle2( in lowp vec3 res, in mediump float val ) | |
| 21 | { | |
| 22 | return ((res - 0.5) * pow( (cos(val) + 1.0), val)); | |
| 23 | } | |
| 24 | ||
| 25 | lowp vec3 TestCycle( in lowp vec3 rgb, in mediump float passes ) | |
| 26 | { | |
| 27 | lowp vec3 res = rgb; | |
| 28 | // a weird form of loop that was causing a bug | |
| 29 | highp float i = 0.0; | |
| 30 | for ( ; (i < 4.0); i += 1.0) { | |
| 31 | ||
| 32 | if ((i == passes)){ | |
| 33 | break; | |
| 34 | } | |
| 35 | if ((i == 0.0)){ | |
| 36 | res = TestCycle2( res, ((_ContrastShift.x * 3.0) + 12.0)); | |
| 37 | } | |
| 38 | else{ | |
| 39 | if ((i == 1.0)){ | |
| 40 | res = TestCycle2( res, ((_SaturationShift.y * 3.0) + 12.0)); | |
| 41 | } | |
| 42 | else{ | |
| 43 | if ((i == 2.0)){ | |
| 44 | res = TestCycle2( res, ((_HueShift.z * 3.0) + 12.0)); | |
| 45 | } | |
| 46 | else{ | |
| 47 | res = TestCycle2( res, ((_LuminosityShift.x * 3.0) + 12.0)); | |
| 48 | } | |
| 49 | } | |
| 50 | } | |
| 51 | } | |
| 52 | ||
| 53 | return res; | |
| 54 | } | |
| 55 | ||
| 56 | lowp vec3 surf( in mediump vec2 uv ) | |
| 57 | { | |
| 58 | lowp vec4 t = texture(_MainTex, uv); | |
| 59 | if (_NumPasses > 0.0) | |
| 60 | t.xyz = TestCycle(t.xyz, _NumPasses); | |
| 61 | return t.xyz; | |
| 62 | } | |
| 63 | ||
| 64 | lowp vec4 frag_surf( in v2f_surf IN ) | |
| 65 | { | |
| 66 | lowp vec3 col = surf( IN.uv); | |
| 67 | return vec4( col, 1.0); | |
| 68 | } | |
| 69 | in mediump vec2 xlv_TEXCOORD0; | |
| 70 | void main() { | |
| 71 | lowp vec4 xl_retval; | |
| 72 | v2f_surf xlt_IN; | |
| 73 | xlt_IN.uv = vec2(xlv_TEXCOORD0); | |
| 74 | xlt_IN.pos = vec4(0.0); | |
| 75 | xl_retval = frag_surf(xlt_IN); | |
| 76 | _fragData = vec4(xl_retval); | |
| 77 | } | |
| 78 |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | out mediump vec4 _fragData; | |
| 3 | uniform sampler2D _MainTex; | |
| 4 | uniform mediump float _NumPasses; | |
| 5 | uniform mediump vec4 _ContrastShift; | |
| 6 | uniform mediump vec4 _SaturationShift; | |
| 7 | uniform lowp vec4 _HueShift; | |
| 8 | uniform lowp vec4 _LuminosityShift; | |
| 9 | in mediump vec2 xlv_TEXCOORD0; | |
| 10 | void main () | |
| 11 | { | |
| 12 | lowp vec4 t_1; | |
| 13 | lowp vec4 tmpvar_2; | |
| 14 | tmpvar_2 = texture (_MainTex, xlv_TEXCOORD0); | |
| 15 | t_1 = tmpvar_2; | |
| 16 | if ((_NumPasses > 0.0)) { | |
| 17 | mediump float passes_3; | |
| 18 | passes_3 = _NumPasses; | |
| 19 | highp float i_4; | |
| 20 | lowp vec3 res_5; | |
| 21 | res_5 = tmpvar_2.xyz; | |
| 22 | i_4 = 0.0; | |
| 23 | while (true) { | |
| 24 | if ((i_4 >= 4.0)) { | |
| 25 | break; | |
| 26 | }; | |
| 27 | if ((i_4 == passes_3)) { | |
| 28 | break; | |
| 29 | }; | |
| 30 | if ((i_4 == 0.0)) { | |
| 31 | lowp vec3 tmpvar_6; | |
| 32 | mediump float val_7; | |
| 33 | val_7 = ((_ContrastShift.x * 3.0) + 12.0); | |
| 34 | mediump float tmpvar_8; | |
| 35 | tmpvar_8 = pow ((cos(val_7) + 1.0), val_7); | |
| 36 | tmpvar_6 = ((res_5 - 0.5) * tmpvar_8); | |
| 37 | res_5 = tmpvar_6; | |
| 38 | } else { | |
| 39 | if ((i_4 == 1.0)) { | |
| 40 | lowp vec3 tmpvar_9; | |
| 41 | mediump float val_10; | |
| 42 | val_10 = ((_SaturationShift.y * 3.0) + 12.0); | |
| 43 | mediump float tmpvar_11; | |
| 44 | tmpvar_11 = pow ((cos(val_10) + 1.0), val_10); | |
| 45 | tmpvar_9 = ((res_5 - 0.5) * tmpvar_11); | |
| 46 | res_5 = tmpvar_9; | |
| 47 | } else { | |
| 48 | if ((i_4 == 2.0)) { | |
| 49 | lowp vec3 tmpvar_12; | |
| 50 | mediump float val_13; | |
| 51 | val_13 = ((_HueShift.z * 3.0) + 12.0); | |
| 52 | mediump float tmpvar_14; | |
| 53 | tmpvar_14 = pow ((cos(val_13) + 1.0), val_13); | |
| 54 | tmpvar_12 = ((res_5 - 0.5) * tmpvar_14); | |
| 55 | res_5 = tmpvar_12; | |
| 56 | } else { | |
| 57 | lowp vec3 tmpvar_15; | |
| 58 | mediump float val_16; | |
| 59 | val_16 = ((_LuminosityShift.x * 3.0) + 12.0); | |
| 60 | mediump float tmpvar_17; | |
| 61 | tmpvar_17 = pow ((cos(val_16) + 1.0), val_16); | |
| 62 | tmpvar_15 = ((res_5 - 0.5) * tmpvar_17); | |
| 63 | res_5 = tmpvar_15; | |
| 64 | }; | |
| 65 | }; | |
| 66 | }; | |
| 67 | i_4 += 1.0; | |
| 68 | }; | |
| 69 | t_1.xyz = res_5; | |
| 70 | }; | |
| 71 | lowp vec4 tmpvar_18; | |
| 72 | tmpvar_18.w = 1.0; | |
| 73 | tmpvar_18.xyz = t_1.xyz; | |
| 74 | _fragData = tmpvar_18; | |
| 75 | } | |
| 76 | ||
| 77 | ||
| 78 | // stats: 37 alu 1 tex 7 flow | |
| 79 | // inputs: 1 | |
| 80 | // #0: xlv_TEXCOORD0 (medium float) 2x1 [-1] | |
| 81 | // uniforms: 5 (total size: 0) | |
| 82 | // #0: _NumPasses (medium float) 1x1 [-1] | |
| 83 | // #1: _ContrastShift (medium float) 4x1 [-1] | |
| 84 | // #2: _SaturationShift (medium float) 4x1 [-1] | |
| 85 | // #3: _HueShift (low float) 4x1 [-1] | |
| 86 | // #4: _LuminosityShift (low float) 4x1 [-1] | |
| 87 | // textures: 1 | |
| 88 | // #0: _MainTex (low 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #include <metal_stdlib> | |
| 2 | using namespace metal; | |
| 3 | struct xlatMtlShaderInput { | |
| 4 | half2 xlv_TEXCOORD0; | |
| 5 | }; | |
| 6 | struct xlatMtlShaderOutput { | |
| 7 | half4 _fragData [[color(0)]]; | |
| 8 | }; | |
| 9 | struct xlatMtlShaderUniform { | |
| 10 | half _NumPasses; | |
| 11 | half4 _ContrastShift; | |
| 12 | half4 _SaturationShift; | |
| 13 | half4 _HueShift; | |
| 14 | half4 _LuminosityShift; | |
| 15 | }; | |
| 16 | fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] | |
| 17 | , texture2d<half> _MainTex [[texture(0)]], sampler _mtlsmp__MainTex [[sampler(0)]]) | |
| 18 | { | |
| 19 | xlatMtlShaderOutput _mtl_o; | |
| 20 | half4 t_1; | |
| 21 | half4 tmpvar_2; | |
| 22 | tmpvar_2 = _MainTex.sample(_mtlsmp__MainTex, (float2)(_mtl_i.xlv_TEXCOORD0)); | |
| 23 | t_1 = tmpvar_2; | |
| 24 | if ((_mtl_u._NumPasses > (half)0.0)) { | |
| 25 | half passes_3; | |
| 26 | passes_3 = _mtl_u._NumPasses; | |
| 27 | float i_4; | |
| 28 | half3 res_5; | |
| 29 | res_5 = tmpvar_2.xyz; | |
| 30 | i_4 = 0.0; | |
| 31 | while (true) { | |
| 32 | if ((i_4 >= 4.0)) { | |
| 33 | break; | |
| 34 | }; | |
| 35 | if ((i_4 == (float)passes_3)) { | |
| 36 | break; | |
| 37 | }; | |
| 38 | if ((i_4 == 0.0)) { | |
| 39 | half3 tmpvar_6; | |
| 40 | half val_7; | |
| 41 | val_7 = ((_mtl_u._ContrastShift.x * (half)3.0) + (half)12.0); | |
| 42 | half tmpvar_8; | |
| 43 | tmpvar_8 = pow ((cos(val_7) + (half)1.0), val_7); | |
| 44 | tmpvar_6 = ((res_5 - (half)0.5) * tmpvar_8); | |
| 45 | res_5 = tmpvar_6; | |
| 46 | } else { | |
| 47 | if ((i_4 == 1.0)) { | |
| 48 | half3 tmpvar_9; | |
| 49 | half val_10; | |
| 50 | val_10 = ((_mtl_u._SaturationShift.y * (half)3.0) + (half)12.0); | |
| 51 | half tmpvar_11; | |
| 52 | tmpvar_11 = pow ((cos(val_10) + (half)1.0), val_10); | |
| 53 | tmpvar_9 = ((res_5 - (half)0.5) * tmpvar_11); | |
| 54 | res_5 = tmpvar_9; | |
| 55 | } else { | |
| 56 | if ((i_4 == 2.0)) { | |
| 57 | half3 tmpvar_12; | |
| 58 | half val_13; | |
| 59 | val_13 = ((_mtl_u._HueShift.z * (half)3.0) + (half)12.0); | |
| 60 | half tmpvar_14; | |
| 61 | tmpvar_14 = pow ((cos(val_13) + (half)1.0), val_13); | |
| 62 | tmpvar_12 = ((res_5 - (half)0.5) * tmpvar_14); | |
| 63 | res_5 = tmpvar_12; | |
| 64 | } else { | |
| 65 | half3 tmpvar_15; | |
| 66 | half val_16; | |
| 67 | val_16 = ((_mtl_u._LuminosityShift.x * (half)3.0) + (half)12.0); | |
| 68 | half tmpvar_17; | |
| 69 | tmpvar_17 = pow ((cos(val_16) + (half)1.0), val_16); | |
| 70 | tmpvar_15 = ((res_5 - (half)0.5) * tmpvar_17); | |
| 71 | res_5 = tmpvar_15; | |
| 72 | }; | |
| 73 | }; | |
| 74 | }; | |
| 75 | i_4 += 1.0; | |
| 76 | }; | |
| 77 | t_1.xyz = res_5; | |
| 78 | }; | |
| 79 | half4 tmpvar_18; | |
| 80 | tmpvar_18.w = half(1.0); | |
| 81 | tmpvar_18.xyz = t_1.xyz; | |
| 82 | _mtl_o._fragData = tmpvar_18; | |
| 83 | return _mtl_o; | |
| 84 | } | |
| 85 | ||
| 86 | ||
| 87 | // stats: 37 alu 1 tex 7 flow | |
| 88 | // inputs: 1 | |
| 89 | // #0: xlv_TEXCOORD0 (medium float) 2x1 [-1] | |
| 90 | // uniforms: 5 (total size: 40) | |
| 91 | // #0: _NumPasses (medium float) 1x1 [-1] loc 0 | |
| 92 | // #1: _ContrastShift (medium float) 4x1 [-1] loc 8 | |
| 93 | // #2: _SaturationShift (medium float) 4x1 [-1] loc 16 | |
| 94 | // #3: _HueShift (low float) 4x1 [-1] loc 24 | |
| 95 | // #4: _LuminosityShift (low float) 4x1 [-1] loc 32 | |
| 96 | // textures: 1 | |
| 97 | // #0: _MainTex (low 2d) 0x0 [-1] loc 0 |
| r0 | r245595 | |
|---|---|---|
| 1 | varying vec2 uv; | |
| 2 | ||
| 3 | void main() | |
| 4 | { | |
| 5 | vec4 c = vec4(0.0); | |
| 6 | float a, b; | |
| 7 | ||
| 8 | a = uv.y * 1.111111e+6; | |
| 9 | b = uv.y * 1.111110e+6; | |
| 10 | c.x = a-b; | |
| 11 | ||
| 12 | a = uv.y * 1.23456789; | |
| 13 | b = uv.y * 1.23456765; | |
| 14 | c.y = a-b; | |
| 15 | ||
| 16 | a = uv.y * -1.234567e-6; | |
| 17 | b = uv.y * -1.234565e-6; | |
| 18 | c.z = a-b; | |
| 19 | ||
| 20 | gl_FragColor = c; | |
| 21 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | varying vec2 uv; | |
| 2 | void main () | |
| 3 | { | |
| 4 | float b_1; | |
| 5 | float a_2; | |
| 6 | vec4 c_3; | |
| 7 | c_3.w = 0.0; | |
| 8 | a_2 = (uv.y * 1111111.0); | |
| 9 | b_1 = (uv.y * 1111110.0); | |
| 10 | c_3.x = (a_2 - b_1); | |
| 11 | a_2 = (uv.y * 1.234568); | |
| 12 | b_1 = (uv.y * 1.234568); | |
| 13 | c_3.y = (a_2 - b_1); | |
| 14 | a_2 = (uv.y * -1.234567e-06); | |
| 15 | b_1 = (uv.y * -1.234565e-06); | |
| 16 | c_3.z = (a_2 - b_1); | |
| 17 | gl_FragColor = c_3; | |
| 18 | } | |
| 19 | ||
| 20 | ||
| 21 | // stats: 10 alu 0 tex 0 flow | |
| 22 | // inputs: 1 | |
| 23 | // #0: uv (high float) 2x1 [-1] |
| r245594 | r245595 | |
|---|---|---|
| 55 | 55 | ip = vec4(i); |
| 56 | 56 | return x-ip; |
| 57 | 57 | } |
| 58 | mediump vec4 xlat_main( in highp vec4 uv ); | |
| 59 | mediump vec4 xlat_main( in highp vec4 uv ) { | |
| 58 | ||
| 59 | mediump vec4 xlat_main (in highp vec4 uv) | |
| 60 | { | |
| 60 | 61 | mediump vec4 c; |
| 61 | 62 | mediump vec4 d; |
| 62 | 63 | c = vec4( 0.000000); |
| r245594 | r245595 | |
| 68 | 69 | c.xy += xll_modf( uv.xy , d.xy ); |
| 69 | 70 | c.xyz += xll_modf( uv.xyz , d.xyz ); |
| 70 | 71 | c.xyzw += xll_modf( uv.xyzw , d.xyzw ); |
| 72 | ||
| 73 | // GLSL mod function | |
| 74 | c.x += mod(uv.x, d.x); | |
| 75 | c.xy += mod(uv.xy, d.xy); | |
| 76 | c.xyz += mod(uv.xyz, d.xyz); | |
| 77 | ||
| 78 | // inverse | |
| 79 | c.x += 1.0/uv.x; // float | |
| 80 | c.x += max(0.0, 1.0/uv.x); | |
| 81 | ||
| 82 | c.y += 1.0/c.z; // half | |
| 83 | c.y += max(0.0, 1.0/c.w); | |
| 84 | ||
| 85 | // max with different precision arguments | |
| 86 | c.x += max(uv.x, c.z); | |
| 87 | ||
| 71 | 88 | return c; |
| 72 | 89 | } |
| 90 | ||
| 73 | 91 | in highp vec4 xlv_TEXCOORD0; |
| 74 | 92 | out mediump vec4 _fragData; |
| 75 | 93 | void main() { |
| r245594 | r245595 | |
|---|---|---|
| 97 | 97 | c_1 = (c_1 + tmpvar_22); |
| 98 | 98 | highp float tmpvar_23; |
| 99 | 99 | mediump float ip_24; |
| 100 | int tmpvar_25; | |
| 100 | highp int tmpvar_25; | |
| 101 | 101 | tmpvar_25 = int(xlv_TEXCOORD0.x); |
| 102 | 102 | ip_24 = float(tmpvar_25); |
| 103 | 103 | tmpvar_23 = (xlv_TEXCOORD0.x - ip_24); |
| 104 | 104 | c_1.x = (c_1.x + tmpvar_23); |
| 105 | 105 | highp vec2 tmpvar_26; |
| 106 | mediump vec2 ip_27; | |
| 107 | highp vec2 tmpvar_28; | |
| 108 | tmpvar_28 = vec2(ivec2(xlv_TEXCOORD0.xy)); | |
| 109 | ip_27 = tmpvar_28; | |
| 110 | tmpvar_26 = (xlv_TEXCOORD0.xy - ip_27); | |
| 106 | highp ivec2 tmpvar_27; | |
| 107 | tmpvar_27 = ivec2(xlv_TEXCOORD0.xy); | |
| 108 | mediump vec2 tmpvar_28; | |
| 109 | tmpvar_28 = vec2(tmpvar_27); | |
| 110 | tmpvar_26 = (xlv_TEXCOORD0.xy - tmpvar_28); | |
| 111 | 111 | c_1.xy = (c_1.xy + tmpvar_26); |
| 112 | 112 | highp vec3 tmpvar_29; |
| 113 | mediump vec3 ip_30; | |
| 114 | highp vec3 tmpvar_31; | |
| 115 | tmpvar_31 = vec3(ivec3(xlv_TEXCOORD0.xyz)); | |
| 116 | ip_30 = tmpvar_31; | |
| 117 | tmpvar_29 = (xlv_TEXCOORD0.xyz - ip_30); | |
| 113 | highp ivec3 tmpvar_30; | |
| 114 | tmpvar_30 = ivec3(xlv_TEXCOORD0.xyz); | |
| 115 | mediump vec3 tmpvar_31; | |
| 116 | tmpvar_31 = vec3(tmpvar_30); | |
| 117 | tmpvar_29 = (xlv_TEXCOORD0.xyz - tmpvar_31); | |
| 118 | 118 | c_1.xyz = (c_1.xyz + tmpvar_29); |
| 119 | 119 | highp vec4 tmpvar_32; |
| 120 | mediump vec4 ip_33; | |
| 121 | highp vec4 tmpvar_34; | |
| 122 | tmpvar_34 = vec4(ivec4(xlv_TEXCOORD0)); | |
| 123 | ip_33 = tmpvar_34; | |
| 124 | tmpvar_32 = (xlv_TEXCOORD0 - ip_33); | |
| 120 | highp ivec4 tmpvar_33; | |
| 121 | tmpvar_33 = ivec4(xlv_TEXCOORD0); | |
| 122 | mediump vec4 tmpvar_34; | |
| 123 | tmpvar_34 = vec4(tmpvar_33); | |
| 124 | tmpvar_32 = (xlv_TEXCOORD0 - tmpvar_34); | |
| 125 | 125 | c_1 = (c_1 + tmpvar_32); |
| 126 | 126 | gl_FragData[0] = c_1; |
| 127 | 127 | } |
| r245594 | r245595 | |
|---|---|---|
| 99 | 99 | c_1 = (c_1 + tmpvar_22); |
| 100 | 100 | highp float tmpvar_23; |
| 101 | 101 | mediump float ip_24; |
| 102 | int tmpvar_25; | |
| 102 | highp int tmpvar_25; | |
| 103 | 103 | tmpvar_25 = int(xlv_TEXCOORD0.x); |
| 104 | 104 | ip_24 = float(tmpvar_25); |
| 105 | 105 | tmpvar_23 = (xlv_TEXCOORD0.x - ip_24); |
| 106 | 106 | c_1.x = (c_1.x + tmpvar_23); |
| 107 | 107 | highp vec2 tmpvar_26; |
| 108 | mediump vec2 ip_27; | |
| 109 | highp vec2 tmpvar_28; | |
| 110 | tmpvar_28 = vec2(ivec2(xlv_TEXCOORD0.xy)); | |
| 111 | ip_27 = tmpvar_28; | |
| 112 | tmpvar_26 = (xlv_TEXCOORD0.xy - ip_27); | |
| 108 | highp ivec2 tmpvar_27; | |
| 109 | tmpvar_27 = ivec2(xlv_TEXCOORD0.xy); | |
| 110 | mediump vec2 tmpvar_28; | |
| 111 | tmpvar_28 = vec2(tmpvar_27); | |
| 112 | tmpvar_26 = (xlv_TEXCOORD0.xy - tmpvar_28); | |
| 113 | 113 | c_1.xy = (c_1.xy + tmpvar_26); |
| 114 | 114 | highp vec3 tmpvar_29; |
| 115 | mediump vec3 ip_30; | |
| 116 | highp vec3 tmpvar_31; | |
| 117 | tmpvar_31 = vec3(ivec3(xlv_TEXCOORD0.xyz)); | |
| 118 | ip_30 = tmpvar_31; | |
| 119 | tmpvar_29 = (xlv_TEXCOORD0.xyz - ip_30); | |
| 115 | highp ivec3 tmpvar_30; | |
| 116 | tmpvar_30 = ivec3(xlv_TEXCOORD0.xyz); | |
| 117 | mediump vec3 tmpvar_31; | |
| 118 | tmpvar_31 = vec3(tmpvar_30); | |
| 119 | tmpvar_29 = (xlv_TEXCOORD0.xyz - tmpvar_31); | |
| 120 | 120 | c_1.xyz = (c_1.xyz + tmpvar_29); |
| 121 | 121 | highp vec4 tmpvar_32; |
| 122 | mediump vec4 ip_33; | |
| 123 | highp vec4 tmpvar_34; | |
| 124 | tmpvar_34 = vec4(ivec4(xlv_TEXCOORD0)); | |
| 125 | ip_33 = tmpvar_34; | |
| 126 | tmpvar_32 = (xlv_TEXCOORD0 - ip_33); | |
| 122 | highp ivec4 tmpvar_33; | |
| 123 | tmpvar_33 = ivec4(xlv_TEXCOORD0); | |
| 124 | mediump vec4 tmpvar_34; | |
| 125 | tmpvar_34 = vec4(tmpvar_33); | |
| 126 | tmpvar_32 = (xlv_TEXCOORD0 - tmpvar_34); | |
| 127 | 127 | c_1 = (c_1 + tmpvar_32); |
| 128 | highp float tmpvar_35; | |
| 129 | tmpvar_35 = (float(mod (xlv_TEXCOORD0.x, tmpvar_34.x))); | |
| 130 | c_1.x = (c_1.x + tmpvar_35); | |
| 131 | highp vec2 tmpvar_36; | |
| 132 | tmpvar_36 = (vec2(mod (xlv_TEXCOORD0.xy, tmpvar_34.xy))); | |
| 133 | c_1.xy = (c_1.xy + tmpvar_36); | |
| 134 | highp vec3 tmpvar_37; | |
| 135 | tmpvar_37 = (vec3(mod (xlv_TEXCOORD0.xyz, tmpvar_34.xyz))); | |
| 136 | c_1.xyz = (c_1.xyz + tmpvar_37); | |
| 137 | highp float tmpvar_38; | |
| 138 | tmpvar_38 = (1.0/(xlv_TEXCOORD0.x)); | |
| 139 | c_1.x = (c_1.x + tmpvar_38); | |
| 140 | highp float tmpvar_39; | |
| 141 | tmpvar_39 = max (0.0, tmpvar_38); | |
| 142 | c_1.x = (c_1.x + tmpvar_39); | |
| 143 | c_1.y = (c_1.y + (1.0/(c_1.z))); | |
| 144 | c_1.y = (c_1.y + max (0.0, (1.0/(c_1.w)))); | |
| 145 | highp float tmpvar_40; | |
| 146 | tmpvar_40 = max (xlv_TEXCOORD0.x, c_1.z); | |
| 147 | c_1.x = (c_1.x + tmpvar_40); | |
| 128 | 148 | _fragData = c_1; |
| 129 | 149 | } |
| 130 | 150 | |
| 131 | 151 | |
| 132 | // stats: | |
| 152 | // stats: 73 alu 0 tex 10 flow | |
| 133 | 153 | // inputs: 1 |
| 134 | 154 | // #0: xlv_TEXCOORD0 (high float) 4x1 [-1] |
| r245594 | r245595 | |
|---|---|---|
| 113 | 113 | tmpvar_23 = (_mtl_i.xlv_TEXCOORD0.x - (float)ip_24); |
| 114 | 114 | c_1.x = ((half)((float)c_1.x + tmpvar_23)); |
| 115 | 115 | float2 tmpvar_26; |
| 116 | half2 ip_27; | |
| 117 | float2 tmpvar_28; | |
| 118 | tmpvar_28 = float2(int2(_mtl_i.xlv_TEXCOORD0.xy)); | |
| 119 | ip_27 = half2(tmpvar_28); | |
| 120 | tmpvar_26 = (_mtl_i.xlv_TEXCOORD0.xy - (float2)ip_27); | |
| 116 | int2 tmpvar_27; | |
| 117 | tmpvar_27 = int2(_mtl_i.xlv_TEXCOORD0.xy); | |
| 118 | half2 tmpvar_28; | |
| 119 | tmpvar_28 = half2(float2(tmpvar_27)); | |
| 120 | tmpvar_26 = (_mtl_i.xlv_TEXCOORD0.xy - (float2)tmpvar_28); | |
| 121 | 121 | c_1.xy = ((half2)((float2)c_1.xy + tmpvar_26)); |
| 122 | 122 | float3 tmpvar_29; |
| 123 | half3 ip_30; | |
| 124 | float3 tmpvar_31; | |
| 125 | tmpvar_31 = float3(int3(_mtl_i.xlv_TEXCOORD0.xyz)); | |
| 126 | ip_30 = half3(tmpvar_31); | |
| 127 | tmpvar_29 = (_mtl_i.xlv_TEXCOORD0.xyz - (float3)ip_30); | |
| 123 | int3 tmpvar_30; | |
| 124 | tmpvar_30 = int3(_mtl_i.xlv_TEXCOORD0.xyz); | |
| 125 | half3 tmpvar_31; | |
| 126 | tmpvar_31 = half3(float3(tmpvar_30)); | |
| 127 | tmpvar_29 = (_mtl_i.xlv_TEXCOORD0.xyz - (float3)tmpvar_31); | |
| 128 | 128 | c_1.xyz = ((half3)((float3)c_1.xyz + tmpvar_29)); |
| 129 | 129 | float4 tmpvar_32; |
| 130 | half4 ip_33; | |
| 131 | float4 tmpvar_34; | |
| 132 | tmpvar_34 = float4(int4(_mtl_i.xlv_TEXCOORD0)); | |
| 133 | ip_33 = half4(tmpvar_34); | |
| 134 | tmpvar_32 = (_mtl_i.xlv_TEXCOORD0 - (float4)ip_33); | |
| 130 | int4 tmpvar_33; | |
| 131 | tmpvar_33 = int4(_mtl_i.xlv_TEXCOORD0); | |
| 132 | half4 tmpvar_34; | |
| 133 | tmpvar_34 = half4(float4(tmpvar_33)); | |
| 134 | tmpvar_32 = (_mtl_i.xlv_TEXCOORD0 - (float4)tmpvar_34); | |
| 135 | 135 | c_1 = ((half4)((float4)c_1 + tmpvar_32)); |
| 136 | float tmpvar_35; | |
| 137 | tmpvar_35 = (float(fmod (_mtl_i.xlv_TEXCOORD0.x, (float)tmpvar_34.x))); | |
| 138 | c_1.x = half(((float)c_1.x + tmpvar_35)); | |
| 139 | float2 tmpvar_36; | |
| 140 | tmpvar_36 = (float2(fmod (_mtl_i.xlv_TEXCOORD0.xy, (float2)tmpvar_34.xy))); | |
| 141 | c_1.xy = half2(((float2)c_1.xy + tmpvar_36)); | |
| 142 | float3 tmpvar_37; | |
| 143 | tmpvar_37 = (float3(fmod (_mtl_i.xlv_TEXCOORD0.xyz, (float3)tmpvar_34.xyz))); | |
| 144 | c_1.xyz = half3(((float3)c_1.xyz + tmpvar_37)); | |
| 145 | float tmpvar_38; | |
| 146 | tmpvar_38 = (1.0/(_mtl_i.xlv_TEXCOORD0.x)); | |
| 147 | c_1.x = half(((float)c_1.x + tmpvar_38)); | |
| 148 | float tmpvar_39; | |
| 149 | tmpvar_39 = max (0.0, tmpvar_38); | |
| 150 | c_1.x = half(((float)c_1.x + tmpvar_39)); | |
| 151 | c_1.y = (c_1.y + ((half)1.0/(c_1.z))); | |
| 152 | c_1.y = (c_1.y + max ((half)0.0, ((half)1.0/(c_1.w)))); | |
| 153 | float tmpvar_40; | |
| 154 | tmpvar_40 = max (_mtl_i.xlv_TEXCOORD0.x, (float)c_1.z); | |
| 155 | c_1.x = half(((float)c_1.x + tmpvar_40)); | |
| 136 | 156 | _mtl_o._fragData = c_1; |
| 137 | 157 | return _mtl_o; |
| 138 | 158 | } |
| 139 | 159 | |
| 140 | 160 | |
| 141 | // stats: | |
| 161 | // stats: 73 alu 0 tex 10 flow | |
| 142 | 162 | // inputs: 1 |
| 143 | 163 | // #0: xlv_TEXCOORD0 (high float) 4x1 [-1] |
| r245594 | r245595 | |
|---|---|---|
| 8 | 8 | uniform mediump vec4 _TerrainTreeLightColors[4]; |
| 9 | 9 | lowp vec4 xlat_main (in v2f i) { |
| 10 | 10 | highp int j = 0; |
| 11 | lowp vec4 col = texture | |
| 11 | lowp vec4 col = texture( _MainTex, i.uv); | |
| 12 | 12 | mediump vec3 light = vec3(0.0); |
| 13 | 13 | for ( ; (j < 3); (j++)) { |
| 14 | 14 | light += col.xyz * i.nl[j] * _TerrainTreeLightColors[j].xyz; |
| r245594 | r245595 | |
|---|---|---|
| 7 | 7 | uniform sampler2D _MainTex; |
| 8 | 8 | uniform mediump vec4 _TerrainTreeLightColors[4]; |
| 9 | 9 | lowp vec4 xlat_main (in v2f i) { |
| 10 | lowp vec4 col = texture | |
| 10 | lowp vec4 col = texture( _MainTex, i.uv); | |
| 11 | 11 | if (col.w < 0.5) |
| 12 | 12 | discard; |
| 13 | 13 | mediump vec3 light = vec3(0.0); |
| r245594 | r245595 | |
|---|---|---|
| 2 | 2 | { |
| 3 | 3 | highp float f_1; |
| 4 | 4 | f_1 = 0.0; |
| 5 | for (int i_2 = 0; i_2 < 32; i_2++) { | |
| 5 | for (highp int i_2 = 0; i_2 < 32; i_2++) { | |
| 6 | 6 | f_1 = (f_1 + (gl_FragCoord.x * float(i_2))); |
| 7 | 7 | }; |
| 8 | 8 | highp vec4 tmpvar_3; |
| r245594 | r245595 | |
|---|---|---|
| 7 | 7 | lowp vec4 tmpvar_1; |
| 8 | 8 | highp vec3 tmpvar_2; |
| 9 | 9 | tmpvar_2 = xlv_nl; |
| 10 | int loopCount_4; | |
| 10 | lowp int loopCount_4; | |
| 11 | 11 | mediump vec3 light_5; |
| 12 | 12 | lowp vec4 col_6; |
| 13 | 13 | lowp vec4 tmpvar_7; |
| r245594 | r245595 | |
| 15 | 15 | col_6 = tmpvar_7; |
| 16 | 16 | light_5 = vec3(0.0, 0.0, 0.0); |
| 17 | 17 | loopCount_4 = int((tmpvar_7.w * 10.0)); |
| 18 | for (int j_3 = 0; j_3 < loopCount_4; j_3++) { | |
| 18 | for (highp int j_3 = 0; j_3 < loopCount_4; j_3++) { | |
| 19 | 19 | light_5 = (light_5 + ((col_6.xyz * |
| 20 | 20 | tmpvar_2[j_3] |
| 21 | 21 | ) * _TerrainTreeLightColors[j_3].xyz)); |
| r245594 | r245595 | |
|---|---|---|
| 2 | 2 | void main () |
| 3 | 3 | { |
| 4 | 4 | lowp float c_1; |
| 5 | int tmpvar_3; | |
| 5 | highp int tmpvar_3; | |
| 6 | 6 | if ((xx > 0.5)) { |
| 7 | 7 | tmpvar_3 = 2; |
| 8 | 8 | } else { |
| r245594 | r245595 | |
| 12 | 12 | discard; |
| 13 | 13 | }; |
| 14 | 14 | c_1 = 0.0; |
| 15 | for (int i_2 = tmpvar_3; i_2 < 4; i_2++, c_1 = (c_1 + xx)) { | |
| 15 | for (highp int i_2 = tmpvar_3; i_2 < 4; i_2++, c_1 = (c_1 + xx)) { | |
| 16 | 16 | }; |
| 17 | 17 | lowp vec4 tmpvar_4; |
| 18 | 18 | tmpvar_4 = vec4(c_1); |
| r245594 | r245595 | |
|---|---|---|
| 8 | 8 | uniform float fh1; |
| 9 | 9 | uniform highp float fh2; |
| 10 | 10 | uniform mediump float fm; |
| 11 | uniform int il1; | |
| 12 | uniform int il2; | |
| 13 | uniform int im; | |
| 11 | uniform highp int il1; | |
| 12 | uniform lowp int il2; | |
| 13 | uniform mediump int im; | |
| 14 | 14 | void main () |
| 15 | 15 | { |
| 16 | int i_1; | |
| 16 | highp int i_1; | |
| 17 | 17 | lowp float f_2; |
| 18 | 18 | highp float tmpvar_3; |
| 19 | 19 | tmpvar_3 = (((fh1 + fh2) + fm) + s1.f); |
| 20 | 20 | f_2 = tmpvar_3; |
| 21 | int tmpvar_4; | |
| 21 | mediump int tmpvar_4; | |
| 22 | 22 | tmpvar_4 = (((il1 + il2) + im) + s1.i); |
| 23 | 23 | i_1 = tmpvar_4; |
| 24 | float tmpvar_5; | |
| 24 | highp float tmpvar_5; | |
| 25 | 25 | if ((gl_FragCoord.x > 0.5)) { |
| 26 | 26 | tmpvar_5 = 0.9; |
| 27 | 27 | } else { |
| r245594 | r245595 | |
|---|---|---|
| 5 | 5 | varying mediump vec2 xlv_TEXCOORD0; |
| 6 | 6 | void main () |
| 7 | 7 | { |
| 8 | lowp float t_1; | |
| 9 | mediump float tmpvar_2; | |
| 10 | tmpvar_2 = clamp (((_EmberFadeStart - 0.05) / (_EmberFadeStart - _EmberFadeEnd)), 0.0, 1.0); | |
| 11 | t_1 = tmpvar_2; | |
| 8 | mediump float x_1; | |
| 9 | x_1 = ((_EmberFadeStart - 0.05) / (_EmberFadeStart - _EmberFadeEnd)); | |
| 10 | lowp float tmpvar_2; | |
| 11 | tmpvar_2 = clamp (x_1, 0.0, 1.0); | |
| 12 | 12 | lowp vec4 tmpvar_3; |
| 13 | 13 | tmpvar_3.w = 1.0; |
| 14 | tmpvar_3.xyz = mix (texture2D (_MainTex, xlv_TEXCOORD0).xyz, texture2D (_BurntTex, xlv_TEXCOORD0).xyz, vec3(t_ | |
| 14 | tmpvar_3.xyz = mix (texture2D (_MainTex, xlv_TEXCOORD0).xyz, texture2D (_BurntTex, xlv_TEXCOORD0).xyz, vec3(tmpvar_2)); | |
| 15 | 15 | gl_FragColor = tmpvar_3; |
| 16 | 16 | } |
| 17 | 17 |
| r245594 | r245595 | |
|---|---|---|
| 5 | 5 | varying mediump vec2 xlv_TEXCOORD0; |
| 6 | 6 | void main () |
| 7 | 7 | { |
| 8 | lowp vec3 t_1; | |
| 9 | mediump vec3 tmpvar_2; | |
| 10 | tmpvar_2 = vec3(clamp (((_EmberFadeStart - 0.05) / (_EmberFadeStart - _EmberFadeEnd)), 0.0, 1.0)); | |
| 11 | t_1 = tmpvar_2; | |
| 8 | mediump float tmpvar_1; | |
| 9 | tmpvar_1 = clamp (((_EmberFadeStart - 0.05) / (_EmberFadeStart - _EmberFadeEnd)), 0.0, 1.0); | |
| 10 | lowp vec3 tmpvar_2; | |
| 11 | tmpvar_2 = vec3(tmpvar_1); | |
| 12 | 12 | lowp vec4 tmpvar_3; |
| 13 | 13 | tmpvar_3.w = 1.0; |
| 14 | tmpvar_3.xyz = mix (texture2D (_MainTex, xlv_TEXCOORD0).xyz, texture2D (_BurntTex, xlv_TEXCOORD0).xyz, t_ | |
| 14 | tmpvar_3.xyz = mix (texture2D (_MainTex, xlv_TEXCOORD0).xyz, texture2D (_BurntTex, xlv_TEXCOORD0).xyz, tmpvar_2); | |
| 15 | 15 | gl_FragColor = tmpvar_3; |
| 16 | 16 | } |
| 17 | 17 |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | ||
| 3 | // A very cut down variant of Unity's directional lightmap; | |
| 4 | // has an inline medium precision matrix constructor, | |
| 5 | // but even if dirBasis is declared as mediump | |
| 6 | // some code was promoting it to high precision. | |
| 7 | ||
| 8 | out mediump vec4 _glesFragData; | |
| 9 | ||
| 10 | mat3 transposem3(mat3 m) { | |
| 11 | return mat3( m[0][0], m[1][0], m[2][0], | |
| 12 | m[0][1], m[1][1], m[2][1], | |
| 13 | m[0][2], m[1][2], m[2][2]); | |
| 14 | } | |
| 15 | ||
| 16 | in mediump vec3 inNormal; | |
| 17 | ||
| 18 | void main() | |
| 19 | { | |
| 20 | mediump mat3 dirBasis = transposem3(mat3( | |
| 21 | vec3( 0.8164966, 0.0, 0.5773503), | |
| 22 | vec3( -0.4082483, 0.7071068, 0.5773503), | |
| 23 | vec3( -0.4082483, -0.7071068, 0.5773503))); | |
| 24 | mediump vec4 c; | |
| 25 | c.xyz = dirBasis * inNormal; | |
| 26 | c.w = 0.0; | |
| 27 | _glesFragData = c; | |
| 28 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | out mediump vec4 _glesFragData; | |
| 3 | in mediump vec3 inNormal; | |
| 4 | void main () | |
| 5 | { | |
| 6 | mediump vec4 c_1; | |
| 7 | mediump mat3 tmpvar_2; | |
| 8 | tmpvar_2[uint(0)].x = 0.8164966; | |
| 9 | tmpvar_2[uint(0)].y = -0.4082483; | |
| 10 | tmpvar_2[uint(0)].z = -0.4082483; | |
| 11 | tmpvar_2[1u].x = 0.0; | |
| 12 | tmpvar_2[1u].y = 0.7071068; | |
| 13 | tmpvar_2[1u].z = -0.7071068; | |
| 14 | tmpvar_2[2u].x = 0.5773503; | |
| 15 | tmpvar_2[2u].y = 0.5773503; | |
| 16 | tmpvar_2[2u].z = 0.5773503; | |
| 17 | c_1.xyz = (tmpvar_2 * inNormal); | |
| 18 | c_1.w = 0.0; | |
| 19 | _glesFragData = c_1; | |
| 20 | } | |
| 21 | ||
| 22 | ||
| 23 | // stats: 11 alu 0 tex 0 flow | |
| 24 | // inputs: 1 | |
| 25 | // #0: inNormal (medium float) 3x1 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #include <metal_stdlib> | |
| 2 | using namespace metal; | |
| 3 | struct xlatMtlShaderInput { | |
| 4 | half3 inNormal; | |
| 5 | }; | |
| 6 | struct xlatMtlShaderOutput { | |
| 7 | half4 _glesFragData [[color(0)]]; | |
| 8 | }; | |
| 9 | struct xlatMtlShaderUniform { | |
| 10 | }; | |
| 11 | fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) | |
| 12 | { | |
| 13 | xlatMtlShaderOutput _mtl_o; | |
| 14 | half4 c_1; | |
| 15 | half3x3 tmpvar_2; | |
| 16 | tmpvar_2[0].x = half(0.8164966); | |
| 17 | tmpvar_2[0].y = half(-0.4082483); | |
| 18 | tmpvar_2[0].z = half(-0.4082483); | |
| 19 | tmpvar_2[1].x = half(0.0); | |
| 20 | tmpvar_2[1].y = half(0.7071068); | |
| 21 | tmpvar_2[1].z = half(-0.7071068); | |
| 22 | tmpvar_2[2].x = half(0.5773503); | |
| 23 | tmpvar_2[2].y = half(0.5773503); | |
| 24 | tmpvar_2[2].z = half(0.5773503); | |
| 25 | c_1.xyz = (tmpvar_2 * _mtl_i.inNormal); | |
| 26 | c_1.w = half(0.0); | |
| 27 | _mtl_o._glesFragData = c_1; | |
| 28 | return _mtl_o; | |
| 29 | } | |
| 30 | ||
| 31 | ||
| 32 | // stats: 11 alu 0 tex 0 flow | |
| 33 | // inputs: 1 | |
| 34 | // #0: inNormal (medium float) 3x1 [-1] |
| r245594 | r245595 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | mediump vec4 xlat_main(in highp vec4 uv) { |
| 11 | 11 | mediump vec4 c; |
| 12 | c = texture2D(texlow, uv.xy); | |
| 13 | c += texture2D(texmed, uv.xy); | |
| 14 | c += texture2D(texhigh, uv.xy); | |
| 15 | c += textureCube(cubelow, uv.xyz); | |
| 16 | c += textureCube(cubemed, uv.xyz); | |
| 17 | c += textureCube(cubehigh, uv.xyz); | |
| 12 | c = texture(texlow, uv.xy); | |
| 13 | c += texture(texmed, uv.xy); | |
| 14 | c += texture(texhigh, uv.xy); | |
| 15 | c += texture(cubelow, uv.xyz); | |
| 16 | c += texture(cubemed, uv.xyz); | |
| 17 | c += texture(cubehigh, uv.xyz); | |
| 18 | 18 | return c; |
| 19 | 19 | } |
| 20 | 20 | in highp vec4 varUV; |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | #extension GL_EXT_shader_texture_lod : enable |
| 2 | lowp vec4 impl_low_texture2DLodEXT(lowp sampler2D sampler, highp vec2 coord, mediump float lod) | |
| 3 | { | |
| 4 | #if defined(GL_EXT_shader_texture_lod) | |
| 5 | return texture2DLodEXT(sampler, coord, lod); | |
| 6 | #else | |
| 7 | return texture2D(sampler, coord, lod); | |
| 8 | #endif | |
| 9 | } | |
| 10 | ||
| 2 | 11 | uniform sampler2D tex; |
| 3 | 12 | varying highp vec4 xlv_TEXCOORD0; |
| 4 | 13 | void main () |
| 5 | 14 | { |
| 6 | 15 | mediump vec4 tmpvar_1; |
| 7 | 16 | lowp vec4 tmpvar_2; |
| 8 | tmpvar_2 = texture2DLodEXT (tex, xlv_TEXCOORD0.xy, 0.0); | |
| 17 | tmpvar_2 = impl_low_texture2DLodEXT (tex, xlv_TEXCOORD0.xy, 0.0); | |
| 9 | 18 | tmpvar_1 = tmpvar_2; |
| 10 | 19 | gl_FragData[0] = tmpvar_1; |
| 11 | 20 | } |
| r245594 | r245595 | |
|---|---|---|
| 6 | 6 | void main () |
| 7 | 7 | { |
| 8 | 8 | lowp vec4 c_1; |
| 9 | c_1 = (textureOffset (tex, uv.xy, ivec2(-2, -3)) + textureOffset (tex, uv.xy, | |
| 9 | c_1 = (textureOffset (tex, uv.xy, ivec2(-2, -3)) + textureOffset (tex, uv.xy, ivec2(4, 5), 0.5)); | |
| 10 | 10 | c_1 = (c_1 + textureOffset (vol, uv, ivec3(-2, -3, -4))); |
| 11 | c_1 = (c_1 + textureOffset (vol, uv, | |
| 11 | c_1 = (c_1 + textureOffset (vol, uv, ivec3(4, 5, 6), -0.5)); | |
| 12 | 12 | c_1 = (c_1 + texelFetch (tex, ivec2(1, 2), 1)); |
| 13 | 13 | c_1 = (c_1 + texelFetch (vol, ivec3(1, 2, 3), 2)); |
| 14 | 14 | c_1 = (c_1 + texelFetchOffset (tex, ivec2(1, 2), 3, ivec2(-2, -3))); |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | #extension GL_EXT_shader_texture_lod : enable |
| 2 | 2 | #extension GL_EXT_shadow_samplers : enable |
| 3 | lowp vec4 impl_low_texture2DProjLodEXT(lowp sampler2D sampler, highp vec4 coord, mediump float lod) | |
| 4 | { | |
| 5 | #if defined(GL_EXT_shader_texture_lod) | |
| 6 | return texture2DProjLodEXT(sampler, coord, lod); | |
| 7 | #else | |
| 8 | return texture2DProj(sampler, coord, lod); | |
| 9 | #endif | |
| 10 | } | |
| 11 | ||
| 12 | lowp vec4 impl_low_texture2DProjLodEXT(lowp sampler2D sampler, highp vec3 coord, mediump float lod) | |
| 13 | { | |
| 14 | #if defined(GL_EXT_shader_texture_lod) | |
| 15 | return texture2DProjLodEXT(sampler, coord, lod); | |
| 16 | #else | |
| 17 | return texture2DProj(sampler, coord, lod); | |
| 18 | #endif | |
| 19 | } | |
| 20 | ||
| 3 | 21 | uniform sampler2D tex; |
| 4 | 22 | uniform lowp sampler2DShadow shadowmap; |
| 5 | 23 | varying highp vec4 uv; |
| r245594 | r245595 | |
| 7 | 25 | { |
| 8 | 26 | lowp vec4 c_1; |
| 9 | 27 | c_1 = (texture2DProj (tex, uv) + texture2DProj (tex, uv.xyz)); |
| 10 | c_1 = (c_1 + texture2DProjLodEXT (tex, uv, 1.0)); | |
| 11 | c_1 = (c_1 + texture2DProjLodEXT (tex, uv.xyz, 1.0)); | |
| 28 | c_1 = (c_1 + impl_low_texture2DProjLodEXT (tex, uv, 1.0)); | |
| 29 | c_1 = (c_1 + impl_low_texture2DProjLodEXT (tex, uv.xyz, 1.0)); | |
| 12 | 30 | c_1 = (c_1 + vec4(shadow2DEXT (shadowmap, uv.xyz))); |
| 13 | 31 | c_1 = (c_1 + vec4(shadow2DProjEXT (shadowmap, uv))); |
| 14 | 32 | gl_FragColor = c_1; |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | ||
| 3 | // A variant produced by Unity's directional lightmap; | |
| 4 | // has an inline medium precision matrix constructor, | |
| 5 | // but even if unity_DirBasis is declared as mediump | |
| 6 | // some code was promoting it to high precision. | |
| 7 | ||
| 8 | #define gl_FragColor _glesFragData[0] | |
| 9 | #define gl_FragData _glesFragData | |
| 10 | layout(location = 0)out mediump vec4 _glesFragData[4]; | |
| 11 | ||
| 12 | mat3 xll_transpose_mf3x3(mat3 m) { | |
| 13 | return mat3( m[0][0], m[1][0], m[2][0], | |
| 14 | m[0][1], m[1][1], m[2][1], | |
| 15 | m[0][2], m[1][2], m[2][2]); | |
| 16 | } | |
| 17 | vec3 xll_saturate_vf3( vec3 x) { | |
| 18 | return clamp( x, 0.0, 1.0); | |
| 19 | } | |
| 20 | struct SurfaceOutput { | |
| 21 | lowp vec3 Albedo; | |
| 22 | lowp vec3 Normal; | |
| 23 | lowp vec3 Emission; | |
| 24 | mediump float Specular; | |
| 25 | lowp float Gloss; | |
| 26 | lowp float Alpha; | |
| 27 | }; | |
| 28 | struct Input { | |
| 29 | highp vec2 uv_MainTex; | |
| 30 | }; | |
| 31 | struct v2f_surf { | |
| 32 | highp vec4 pos; | |
| 33 | highp vec2 pack0; | |
| 34 | lowp vec3 tSpace0; | |
| 35 | lowp vec3 tSpace1; | |
| 36 | lowp vec3 tSpace2; | |
| 37 | highp vec4 lmap; | |
| 38 | }; | |
| 39 | uniform mediump vec4 _WorldSpaceLightPos0; | |
| 40 | uniform sampler2D unity_Lightmap; | |
| 41 | uniform sampler2D unity_LightmapInd; | |
| 42 | uniform lowp vec4 _LightColor0; | |
| 43 | uniform lowp vec4 _SpecColor; | |
| 44 | uniform sampler2D _MainTex; | |
| 45 | uniform highp vec4 _MainTex_ST; | |
| 46 | lowp vec3 DecodeLightmapDoubleLDR( in lowp vec4 color ) { | |
| 47 | return (2.0 * color.xyz); | |
| 48 | } | |
| 49 | lowp vec3 DecodeLightmap( in lowp vec4 color ) { | |
| 50 | ||
| 51 | return DecodeLightmapDoubleLDR( color); | |
| 52 | } | |
| 53 | mediump vec3 DirLightmapDiffuse( in mediump mat3 dirBasis, in lowp vec4 color, in lowp vec4 scale, in mediump vec3 normal, in bool surfFuncWritesNormal, out mediump vec3 scalePerBasisVector ) { | |
| 54 | mediump vec3 lm = DecodeLightmap( color); | |
| 55 | ||
| 56 | scalePerBasisVector = DecodeLightmap( scale); | |
| 57 | if (surfFuncWritesNormal){ | |
| 58 | ||
| 59 | mediump vec3 normalInRnmBasis = xll_saturate_vf3((dirBasis * normal)); | |
| 60 | lm *= dot( normalInRnmBasis, scalePerBasisVector); | |
| 61 | } | |
| 62 | ||
| 63 | return lm; | |
| 64 | } | |
| 65 | mediump vec4 LightingLambert_DirLightmap( in SurfaceOutput s, in lowp vec4 color, in lowp vec4 scale, in bool surfFuncWritesNormal ) { | |
| 66 | mediump mat3 unity_DirBasis = xll_transpose_mf3x3(mat3( vec3( 0.8164966, 0.0, 0.5773503), vec3( -0.4082483, 0.7071068, 0.5773503), vec3( -0.4082483, -0.7071068, 0.5773503))); | |
| 67 | mediump vec3 scalePerBasisVector; | |
| 68 | ||
| 69 | mediump vec4 c; | |
| 70 | c.xyz = DirLightmapDiffuse( unity_DirBasis, color, scale, s.Normal, surfFuncWritesNormal, scalePerBasisVector); | |
| 71 | c.w = 0.0; | |
| 72 | ||
| 73 | return c; | |
| 74 | } | |
| 75 | void surf( in Input IN, inout SurfaceOutput o ) { | |
| 76 | mediump vec4 c = texture( _MainTex, IN.uv_MainTex); | |
| 77 | o.Albedo = c.xyz; | |
| 78 | o.Alpha = c.w; | |
| 79 | ||
| 80 | o.Normal = ((c.xyz * 2.0) - 1.0); | |
| 81 | } | |
| 82 | lowp vec4 frag_surf( in v2f_surf IN ) { | |
| 83 | Input surfIN; | |
| 84 | ||
| 85 | surfIN.uv_MainTex = IN.pack0.xy; | |
| 86 | highp vec3 lightDir = _WorldSpaceLightPos0.xyz; | |
| 87 | ||
| 88 | SurfaceOutput o; | |
| 89 | o.Albedo = vec3( 0.0); | |
| 90 | o.Emission = vec3( 0.0); | |
| 91 | ||
| 92 | o.Specular = 0.0; | |
| 93 | o.Alpha = 0.0; | |
| 94 | o.Gloss = 0.0; | |
| 95 | lowp vec3 normalWorldVertex = vec3( 0.0, 0.0, 1.0); | |
| 96 | ||
| 97 | surf( surfIN, o); | |
| 98 | lowp float atten = 1.0; | |
| 99 | ||
| 100 | lowp vec4 c = vec4( 0.0); | |
| 101 | ||
| 102 | lowp vec4 lmtex = texture( unity_Lightmap, IN.lmap.xy); | |
| 103 | lowp vec4 lmIndTex = texture( unity_LightmapInd, IN.lmap.xy); | |
| 104 | mediump vec3 lm = LightingLambert_DirLightmap( o, lmtex, lmIndTex, true).xyz; | |
| 105 | ||
| 106 | lowp vec3 worldN; | |
| 107 | worldN.x = dot( IN.tSpace0.xyz, o.Normal); | |
| 108 | worldN.y = dot( IN.tSpace1.xyz, o.Normal); | |
| 109 | worldN.z = dot( IN.tSpace2.xyz, o.Normal); | |
| 110 | ||
| 111 | o.Normal = worldN; | |
| 112 | ||
| 113 | c.w = o.Alpha; | |
| 114 | ||
| 115 | c.xyz += (o.Albedo * lm); | |
| 116 | ||
| 117 | c.w = 1.0; | |
| 118 | return c; | |
| 119 | } | |
| 120 | in highp vec2 xlv_TEXCOORD0; | |
| 121 | in lowp vec3 xlv_TEXCOORD1; | |
| 122 | in lowp vec3 xlv_TEXCOORD2; | |
| 123 | in lowp vec3 xlv_TEXCOORD3; | |
| 124 | in highp vec4 xlv_TEXCOORD4; | |
| 125 | void main() { | |
| 126 | lowp vec4 xl_retval; | |
| 127 | v2f_surf xlt_IN; | |
| 128 | xlt_IN.pos = vec4(0.0); | |
| 129 | xlt_IN.pack0 = vec2(xlv_TEXCOORD0); | |
| 130 | xlt_IN.tSpace0 = vec3(xlv_TEXCOORD1); | |
| 131 | xlt_IN.tSpace1 = vec3(xlv_TEXCOORD2); | |
| 132 | xlt_IN.tSpace2 = vec3(xlv_TEXCOORD3); | |
| 133 | xlt_IN.lmap = vec4(xlv_TEXCOORD4); | |
| 134 | xl_retval = frag_surf( xlt_IN); | |
| 135 | gl_FragData[0] = vec4(xl_retval); | |
| 136 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | layout(location=0) out mediump vec4 _glesFragData[4]; | |
| 3 | uniform sampler2D unity_Lightmap; | |
| 4 | uniform sampler2D unity_LightmapInd; | |
| 5 | uniform sampler2D _MainTex; | |
| 6 | in highp vec2 xlv_TEXCOORD0; | |
| 7 | in highp vec4 xlv_TEXCOORD4; | |
| 8 | void main () | |
| 9 | { | |
| 10 | lowp vec4 c_1; | |
| 11 | lowp vec3 tmpvar_2; | |
| 12 | lowp vec3 tmpvar_3; | |
| 13 | mediump vec4 c_4; | |
| 14 | lowp vec4 tmpvar_5; | |
| 15 | tmpvar_5 = texture (_MainTex, xlv_TEXCOORD0); | |
| 16 | c_4 = tmpvar_5; | |
| 17 | tmpvar_2 = c_4.xyz; | |
| 18 | tmpvar_3 = ((c_4.xyz * 2.0) - 1.0); | |
| 19 | mediump mat3 tmpvar_6; | |
| 20 | tmpvar_6[uint(0)].x = 0.8164966; | |
| 21 | tmpvar_6[uint(0)].y = -0.4082483; | |
| 22 | tmpvar_6[uint(0)].z = -0.4082483; | |
| 23 | tmpvar_6[1u].x = 0.0; | |
| 24 | tmpvar_6[1u].y = 0.7071068; | |
| 25 | tmpvar_6[1u].z = -0.7071068; | |
| 26 | tmpvar_6[2u].x = 0.5773503; | |
| 27 | tmpvar_6[2u].y = 0.5773503; | |
| 28 | tmpvar_6[2u].z = 0.5773503; | |
| 29 | mediump vec3 normal_7; | |
| 30 | normal_7 = tmpvar_3; | |
| 31 | mediump vec3 scalePerBasisVector_8; | |
| 32 | mediump vec3 lm_9; | |
| 33 | lowp vec3 tmpvar_10; | |
| 34 | tmpvar_10 = (2.0 * texture (unity_Lightmap, xlv_TEXCOORD4.xy).xyz); | |
| 35 | lm_9 = tmpvar_10; | |
| 36 | lowp vec3 tmpvar_11; | |
| 37 | tmpvar_11 = (2.0 * texture (unity_LightmapInd, xlv_TEXCOORD4.xy).xyz); | |
| 38 | scalePerBasisVector_8 = tmpvar_11; | |
| 39 | lm_9 = (lm_9 * dot (clamp ( | |
| 40 | (tmpvar_6 * normal_7) | |
| 41 | , 0.0, 1.0), scalePerBasisVector_8)); | |
| 42 | c_1.xyz = (tmpvar_2 * lm_9); | |
| 43 | c_1.w = 1.0; | |
| 44 | _glesFragData[0] = c_1; | |
| 45 | } | |
| 46 | ||
| 47 | ||
| 48 | // stats: 19 alu 3 tex 0 flow | |
| 49 | // inputs: 2 | |
| 50 | // #0: xlv_TEXCOORD0 (high float) 2x1 [-1] | |
| 51 | // #1: xlv_TEXCOORD4 (high float) 4x1 [-1] | |
| 52 | // textures: 3 | |
| 53 | // #0: unity_Lightmap (low 2d) 0x0 [-1] | |
| 54 | // #1: unity_LightmapInd (low 2d) 0x0 [-1] | |
| 55 | // #2: _MainTex (low 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #include <metal_stdlib> | |
| 2 | using namespace metal; | |
| 3 | struct xlatMtlShaderInput { | |
| 4 | float2 xlv_TEXCOORD0; | |
| 5 | float4 xlv_TEXCOORD4; | |
| 6 | }; | |
| 7 | struct xlatMtlShaderOutput { | |
| 8 | half4 _glesFragData_0 [[color(0)]]; | |
| 9 | }; | |
| 10 | struct xlatMtlShaderUniform { | |
| 11 | }; | |
| 12 | fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] | |
| 13 | , texture2d<half> unity_Lightmap [[texture(0)]], sampler _mtlsmp_unity_Lightmap [[sampler(0)]] | |
| 14 | , texture2d<half> unity_LightmapInd [[texture(1)]], sampler _mtlsmp_unity_LightmapInd [[sampler(1)]] | |
| 15 | , texture2d<half> _MainTex [[texture(2)]], sampler _mtlsmp__MainTex [[sampler(2)]]) | |
| 16 | { | |
| 17 | xlatMtlShaderOutput _mtl_o; | |
| 18 | half4 c_1; | |
| 19 | half3 tmpvar_2; | |
| 20 | half3 tmpvar_3; | |
| 21 | half4 c_4; | |
| 22 | half4 tmpvar_5; | |
| 23 | tmpvar_5 = _MainTex.sample(_mtlsmp__MainTex, (float2)(_mtl_i.xlv_TEXCOORD0)); | |
| 24 | c_4 = tmpvar_5; | |
| 25 | tmpvar_2 = c_4.xyz; | |
| 26 | tmpvar_3 = ((c_4.xyz * (half)2.0) - (half)1.0); | |
| 27 | half3x3 tmpvar_6; | |
| 28 | tmpvar_6[0].x = half(0.8164966); | |
| 29 | tmpvar_6[0].y = half(-0.4082483); | |
| 30 | tmpvar_6[0].z = half(-0.4082483); | |
| 31 | tmpvar_6[1].x = half(0.0); | |
| 32 | tmpvar_6[1].y = half(0.7071068); | |
| 33 | tmpvar_6[1].z = half(-0.7071068); | |
| 34 | tmpvar_6[2].x = half(0.5773503); | |
| 35 | tmpvar_6[2].y = half(0.5773503); | |
| 36 | tmpvar_6[2].z = half(0.5773503); | |
| 37 | half3 normal_7; | |
| 38 | normal_7 = tmpvar_3; | |
| 39 | half3 scalePerBasisVector_8; | |
| 40 | half3 lm_9; | |
| 41 | half3 tmpvar_10; | |
| 42 | tmpvar_10 = ((half)2.0 * unity_Lightmap.sample(_mtlsmp_unity_Lightmap, (float2)(_mtl_i.xlv_TEXCOORD4.xy)).xyz); | |
| 43 | lm_9 = tmpvar_10; | |
| 44 | half3 tmpvar_11; | |
| 45 | tmpvar_11 = ((half)2.0 * unity_LightmapInd.sample(_mtlsmp_unity_LightmapInd, (float2)(_mtl_i.xlv_TEXCOORD4.xy)).xyz); | |
| 46 | scalePerBasisVector_8 = tmpvar_11; | |
| 47 | lm_9 = (lm_9 * dot (clamp ( | |
| 48 | (tmpvar_6 * normal_7) | |
| 49 | , (half)0.0, (half)1.0), scalePerBasisVector_8)); | |
| 50 | c_1.xyz = (tmpvar_2 * lm_9); | |
| 51 | c_1.w = half(1.0); | |
| 52 | _mtl_o._glesFragData_0 = c_1; | |
| 53 | return _mtl_o; | |
| 54 | } | |
| 55 | ||
| 56 | ||
| 57 | // stats: 19 alu 3 tex 0 flow | |
| 58 | // inputs: 2 | |
| 59 | // #0: xlv_TEXCOORD0 (high float) 2x1 [-1] | |
| 60 | // #1: xlv_TEXCOORD4 (high float) 4x1 [-1] | |
| 61 | // textures: 3 | |
| 62 | // #0: unity_Lightmap (low 2d) 0x0 [-1] loc 0 | |
| 63 | // #1: unity_LightmapInd (low 2d) 0x0 [-1] loc 1 | |
| 64 | // #2: _MainTex (low 2d) 0x0 [-1] loc 2 |
| r245594 | r245595 | |
|---|---|---|
| 19 | 19 | highp float tmpvar_5; |
| 20 | 20 | tmpvar_5 = clamp (sampleOnEpipolarLine_3, 0.0, 1.0); |
| 21 | 21 | sampleOnEpipolarLine_3 = tmpvar_5; |
| 22 | int tmpvar_6; | |
| 22 | highp int tmpvar_6; | |
| 23 | 23 | tmpvar_6 = int(clamp (floor( |
| 24 | 24 | (tmpvar_4 * 4.0) |
| 25 | 25 | ), 0.0, 3.0)); |
| r245594 | r245595 | |
|---|---|---|
| 60 | 60 | } |
| 61 | 61 | void surf( in Input IN, inout SurfaceOutput o ) { |
| 62 | 62 | vec4 tex; |
| 63 | tex = texture | |
| 63 | tex = texture( _MainTex, IN.uv_MainTex); | |
| 64 | 64 | o.Albedo = (tex.xyz * _Color.xyz ); |
| 65 | 65 | o.Gloss = tex.w ; |
| 66 | 66 | o.Alpha = (tex.w * _Color.w ); |
| 67 | 67 | o.Specular = _Shininess; |
| 68 | o.Normal = vec3( UnpackNormal( texture | |
| 68 | o.Normal = vec3( UnpackNormal( texture( _BumpMap, IN.uv_BumpMap))); | |
| 69 | 69 | } |
| 70 | 70 | vec4 LightingBlinnPhong( in SurfaceOutput s, in vec3 lightDir, in vec3 viewDir, in float atten ) { |
| 71 | 71 | vec3 h; |
| r245594 | r245595 | |
|---|---|---|
| 45 | 45 | c_8.w = (tmpvar_3 + ((_LightColor0.w * _SpecColor.w) * spec_9)); |
| 46 | 46 | c_1.xyz = (c_8.xyz + (tmpvar_2 * _uv3)); |
| 47 | 47 | c_1.w = tmpvar_3; |
| 48 | _fragData = c_1; | |
| 48 | lowp vec4 tmpvar_11; | |
| 49 | tmpvar_11 = c_1; | |
| 50 | _fragData = tmpvar_11; | |
| 49 | 51 | } |
| 50 | 52 | |
| 51 | 53 |
| r245594 | r245595 | |
|---|---|---|
| 55 | 55 | c_8.w = (tmpvar_3 + ((_mtl_u._LightColor0.w * _mtl_u._SpecColor.w) * spec_9)); |
| 56 | 56 | c_1.xyz = (c_8.xyz + (tmpvar_2 * _mtl_i._uv3)); |
| 57 | 57 | c_1.w = tmpvar_3; |
| 58 | _mtl_o._fragData = c_1; | |
| 58 | half4 tmpvar_12; | |
| 59 | tmpvar_12 = c_1; | |
| 60 | _mtl_o._fragData = tmpvar_12; | |
| 59 | 61 | return _mtl_o; |
| 60 | 62 | } |
| 61 | 63 |
| r245594 | r245595 | |
|---|---|---|
| 38 | 38 | far = vec4( lessThan( vec4( z ), _LightSplitsFar) ); |
| 39 | 39 | weights = (near * far); |
| 40 | 40 | coord = vec4( ((((sc0 * weights.x ) + (sc1 * weights.y )) + (sc2 * weights.z )) + (sc3 * weights.w )), 1.00000); |
| 41 | shadow = ( (texture | |
| 41 | shadow = ( (texture( _ShadowMapTexture, coord.xy ).x < coord.z ) ) ? ( _LightShadowData.x ) : ( 1.00000 ); | |
| 42 | 42 | return shadow; |
| 43 | 43 | } |
| 44 | 44 | highp float Linear01Depth( in highp float z ) { |
| r245594 | r245595 | |
| 58 | 58 | highp vec4 vpos; |
| 59 | 59 | mediump float shadow; |
| 60 | 60 | highp vec4 res; |
| 61 | depth = texture | |
| 61 | depth = texture( _CameraDepthTexture, i.uv).x ; | |
| 62 | 62 | depth = Linear01Depth( depth); |
| 63 | 63 | vpos = vec4( (i.ray * depth), 1.00000); |
| 64 | 64 | shadow = unitySampleShadow( vpos); |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | #version 300 es |
| 2 | 2 | out lowp vec4 _fragData; |
| 3 | 3 | vec4 xll_tex2Dlod(sampler2D s, vec4 coord) { |
| 4 | return texture | |
| 4 | return textureLod( s, coord.xy, coord.w); | |
| 5 | 5 | } |
| 6 | 6 | uniform sampler2D _MainTex; |
| 7 | 7 | uniform vec4 _MainTex_TexelSize; |
| r245594 | r245595 | |
|---|---|---|
| 42 | 42 | vec4 tmpvar_24; |
| 43 | 43 | tmpvar_24 = texture2DLod (_MainTex, tmpvar_23.xy, 0.0); |
| 44 | 44 | float tmpvar_25; |
| 45 | tmpvar_25 = ((tmpvar_17.y * 1.96321) + tmpvar_17.x); | |
| 45 | tmpvar_25 = ((tmpvar_17.y * 1.963211) + tmpvar_17.x); | |
| 46 | 46 | lumaN_15 = tmpvar_25; |
| 47 | 47 | float tmpvar_26; |
| 48 | tmpvar_26 = ((tmpvar_19.y * 1.96321) + tmpvar_19.x); | |
| 48 | tmpvar_26 = ((tmpvar_19.y * 1.963211) + tmpvar_19.x); | |
| 49 | 49 | float tmpvar_27; |
| 50 | tmpvar_27 = ((tmpvar_20.y * 1.96321) + tmpvar_20.x); | |
| 50 | tmpvar_27 = ((tmpvar_20.y * 1.963211) + tmpvar_20.x); | |
| 51 | 51 | float tmpvar_28; |
| 52 | tmpvar_28 = ((tmpvar_22.y * 1.96321) + tmpvar_22.x); | |
| 52 | tmpvar_28 = ((tmpvar_22.y * 1.963211) + tmpvar_22.x); | |
| 53 | 53 | float tmpvar_29; |
| 54 | tmpvar_29 = ((tmpvar_24.y * 1.96321) + tmpvar_24.x); | |
| 54 | tmpvar_29 = ((tmpvar_24.y * 1.963211) + tmpvar_24.x); | |
| 55 | 55 | lumaS_14 = tmpvar_29; |
| 56 | 56 | float tmpvar_30; |
| 57 | 57 | tmpvar_30 = max (max (tmpvar_27, tmpvar_25), max (max (tmpvar_26, tmpvar_29), tmpvar_28)); |
| r245594 | r245595 | |
| 60 | 60 | min (tmpvar_26, tmpvar_29) |
| 61 | 61 | , tmpvar_28))); |
| 62 | 62 | float tmpvar_32; |
| 63 | tmpvar_32 = max (0.0416667, (tmpvar_30 * 0.125)); | |
| 63 | tmpvar_32 = max (0.04166667, (tmpvar_30 * 0.125)); | |
| 64 | 64 | if ((tmpvar_31 < tmpvar_32)) { |
| 65 | 65 | tmpvar_2 = tmpvar_20.xyz; |
| 66 | 66 | } else { |
| r245594 | r245595 | |
| 69 | 69 | ((abs(( |
| 70 | 70 | (((tmpvar_25 + tmpvar_26) + (tmpvar_28 + tmpvar_29)) * 0.25) |
| 71 | 71 | - tmpvar_27)) / tmpvar_31) - 0.25) |
| 72 | ) * 1.33333)); | |
| 72 | ) * 1.333333)); | |
| 73 | 73 | vec4 tmpvar_34; |
| 74 | 74 | tmpvar_34.zw = vec2(0.0, 0.0); |
| 75 | 75 | tmpvar_34.xy = (xlv_TEXCOORD0 - _MainTex_TexelSize.xy); |
| r245594 | r245595 | |
| 93 | 93 | rgbL_13 = (((tmpvar_17.xyz + tmpvar_19.xyz) + (tmpvar_20.xyz + tmpvar_22.xyz)) + ((tmpvar_24.xyz + tmpvar_35.xyz) + ( |
| 94 | 94 | (tmpvar_37.xyz + tmpvar_39.xyz) |
| 95 | 95 | + tmpvar_41.xyz))); |
| 96 | rgbL_13 = (rgbL_13 * vec3(0.111111, 0.111111, 0.111111)); | |
| 96 | rgbL_13 = (rgbL_13 * vec3(0.1111111, 0.1111111, 0.1111111)); | |
| 97 | 97 | float tmpvar_42; |
| 98 | tmpvar_42 = ((tmpvar_35.y * 1.96321) + tmpvar_35.x); | |
| 98 | tmpvar_42 = ((tmpvar_35.y * 1.963211) + tmpvar_35.x); | |
| 99 | 99 | float tmpvar_43; |
| 100 | tmpvar_43 = ((tmpvar_37.y * 1.96321) + tmpvar_37.x); | |
| 100 | tmpvar_43 = ((tmpvar_37.y * 1.963211) + tmpvar_37.x); | |
| 101 | 101 | float tmpvar_44; |
| 102 | tmpvar_44 = ((tmpvar_39.y * 1.96321) + tmpvar_39.x); | |
| 102 | tmpvar_44 = ((tmpvar_39.y * 1.963211) + tmpvar_39.x); | |
| 103 | 103 | float tmpvar_45; |
| 104 | tmpvar_45 = ((tmpvar_41.y * 1.96321) + tmpvar_41.x); | |
| 104 | tmpvar_45 = ((tmpvar_41.y * 1.963211) + tmpvar_41.x); | |
| 105 | 105 | bool tmpvar_46; |
| 106 | 106 | tmpvar_46 = ((( |
| 107 | 107 | abs((((0.25 * tmpvar_42) + (-0.5 * tmpvar_26)) + (0.25 * tmpvar_44))) |
| r245594 | r245595 | |
| 186 | 186 | if (!(doneN_5)) { |
| 187 | 187 | vec4 tmpvar_56; |
| 188 | 188 | tmpvar_56 = texture2DLod (_MainTex, posN_10, 0.0); |
| 189 | lumaEndN_7 = ((tmpvar_56.y * 1.96321) + tmpvar_56.x); | |
| 189 | lumaEndN_7 = ((tmpvar_56.y * 1.963211) + tmpvar_56.x); | |
| 190 | 190 | }; |
| 191 | 191 | if (!(doneP_4)) { |
| 192 | 192 | vec4 tmpvar_57; |
| 193 | 193 | tmpvar_57 = texture2DLod (_MainTex, posP_9, 0.0); |
| 194 | lumaEndP_6 = ((tmpvar_57.y * 1.96321) + tmpvar_57.x); | |
| 194 | lumaEndP_6 = ((tmpvar_57.y * 1.963211) + tmpvar_57.x); | |
| 195 | 195 | }; |
| 196 | 196 | bool tmpvar_58; |
| 197 | 197 | if (doneN_5) { |
| r245594 | r245595 | |
|---|---|---|
| 43 | 43 | lowp vec4 tmpvar_24; |
| 44 | 44 | tmpvar_24 = textureLod (_MainTex, tmpvar_23.xy, 0.0); |
| 45 | 45 | lowp float tmpvar_25; |
| 46 | tmpvar_25 = ((tmpvar_17.y * 1.96321) + tmpvar_17.x); | |
| 46 | tmpvar_25 = ((tmpvar_17.y * 1.963211) + tmpvar_17.x); | |
| 47 | 47 | lumaN_15 = tmpvar_25; |
| 48 | 48 | lowp float tmpvar_26; |
| 49 | tmpvar_26 = ((tmpvar_19.y * 1.96321) + tmpvar_19.x); | |
| 49 | tmpvar_26 = ((tmpvar_19.y * 1.963211) + tmpvar_19.x); | |
| 50 | 50 | lowp float tmpvar_27; |
| 51 | tmpvar_27 = ((tmpvar_20.y * 1.96321) + tmpvar_20.x); | |
| 51 | tmpvar_27 = ((tmpvar_20.y * 1.963211) + tmpvar_20.x); | |
| 52 | 52 | lowp float tmpvar_28; |
| 53 | tmpvar_28 = ((tmpvar_22.y * 1.96321) + tmpvar_22.x); | |
| 53 | tmpvar_28 = ((tmpvar_22.y * 1.963211) + tmpvar_22.x); | |
| 54 | 54 | lowp float tmpvar_29; |
| 55 | tmpvar_29 = ((tmpvar_24.y * 1.96321) + tmpvar_24.x); | |
| 55 | tmpvar_29 = ((tmpvar_24.y * 1.963211) + tmpvar_24.x); | |
| 56 | 56 | lumaS_14 = tmpvar_29; |
| 57 | 57 | lowp float tmpvar_30; |
| 58 | 58 | tmpvar_30 = max (max (tmpvar_27, tmpvar_25), max (max (tmpvar_26, tmpvar_29), tmpvar_28)); |
| r245594 | r245595 | |
| 61 | 61 | min (tmpvar_26, tmpvar_29) |
| 62 | 62 | , tmpvar_28))); |
| 63 | 63 | lowp float tmpvar_32; |
| 64 | tmpvar_32 = max (0.0416667, (tmpvar_30 * 0.125)); | |
| 64 | tmpvar_32 = max (0.04166667, (tmpvar_30 * 0.125)); | |
| 65 | 65 | if ((tmpvar_31 < tmpvar_32)) { |
| 66 | 66 | tmpvar_2 = tmpvar_20.xyz; |
| 67 | 67 | } else { |
| r245594 | r245595 | |
| 70 | 70 | ((abs(( |
| 71 | 71 | (((tmpvar_25 + tmpvar_26) + (tmpvar_28 + tmpvar_29)) * 0.25) |
| 72 | 72 | - tmpvar_27)) / tmpvar_31) - 0.25) |
| 73 | ) * 1.33333)); | |
| 73 | ) * 1.333333)); | |
| 74 | 74 | highp vec4 tmpvar_34; |
| 75 | 75 | tmpvar_34.zw = vec2(0.0, 0.0); |
| 76 | 76 | tmpvar_34.xy = (xlv_TEXCOORD0 - _MainTex_TexelSize.xy); |
| r245594 | r245595 | |
| 94 | 94 | rgbL_13 = (((tmpvar_17.xyz + tmpvar_19.xyz) + (tmpvar_20.xyz + tmpvar_22.xyz)) + ((tmpvar_24.xyz + tmpvar_35.xyz) + ( |
| 95 | 95 | (tmpvar_37.xyz + tmpvar_39.xyz) |
| 96 | 96 | + tmpvar_41.xyz))); |
| 97 | rgbL_13 = (rgbL_13 * vec3(0.111111, 0.111111, 0.111111)); | |
| 97 | rgbL_13 = (rgbL_13 * vec3(0.1111111, 0.1111111, 0.1111111)); | |
| 98 | 98 | lowp float tmpvar_42; |
| 99 | tmpvar_42 = ((tmpvar_35.y * 1.96321) + tmpvar_35.x); | |
| 99 | tmpvar_42 = ((tmpvar_35.y * 1.963211) + tmpvar_35.x); | |
| 100 | 100 | lowp float tmpvar_43; |
| 101 | tmpvar_43 = ((tmpvar_37.y * 1.96321) + tmpvar_37.x); | |
| 101 | tmpvar_43 = ((tmpvar_37.y * 1.963211) + tmpvar_37.x); | |
| 102 | 102 | lowp float tmpvar_44; |
| 103 | tmpvar_44 = ((tmpvar_39.y * 1.96321) + tmpvar_39.x); | |
| 103 | tmpvar_44 = ((tmpvar_39.y * 1.963211) + tmpvar_39.x); | |
| 104 | 104 | lowp float tmpvar_45; |
| 105 | tmpvar_45 = ((tmpvar_41.y * 1.96321) + tmpvar_41.x); | |
| 105 | tmpvar_45 = ((tmpvar_41.y * 1.963211) + tmpvar_41.x); | |
| 106 | 106 | bool tmpvar_46; |
| 107 | 107 | tmpvar_46 = ((( |
| 108 | 108 | abs((((0.25 * tmpvar_42) + (-0.5 * tmpvar_26)) + (0.25 * tmpvar_44))) |
| r245594 | r245595 | |
| 183 | 183 | doneP_4 = bool(0); |
| 184 | 184 | posN_10 = (posN_10 - tmpvar_53); |
| 185 | 185 | posP_9 = (posP_9 + tmpvar_53); |
| 186 | for (int i_3 = 0; i_3 < 16; i_3++) { | |
| 186 | for (highp int i_3 = 0; i_3 < 16; i_3++) { | |
| 187 | 187 | if (!(doneN_5)) { |
| 188 | 188 | lowp vec4 tmpvar_56; |
| 189 | 189 | tmpvar_56 = textureLod (_MainTex, posN_10, 0.0); |
| 190 | lumaEndN_7 = ((tmpvar_56.y * 1.96321) + tmpvar_56.x); | |
| 190 | lumaEndN_7 = ((tmpvar_56.y * 1.963211) + tmpvar_56.x); | |
| 191 | 191 | }; |
| 192 | 192 | if (!(doneP_4)) { |
| 193 | 193 | lowp vec4 tmpvar_57; |
| 194 | 194 | tmpvar_57 = textureLod (_MainTex, posP_9, 0.0); |
| 195 | lumaEndP_6 = ((tmpvar_57.y * 1.96321) + tmpvar_57.x); | |
| 195 | lumaEndP_6 = ((tmpvar_57.y * 1.963211) + tmpvar_57.x); | |
| 196 | 196 | }; |
| 197 | 197 | bool tmpvar_58; |
| 198 | 198 | if (doneN_5) { |
| r245594 | r245595 | |
|---|---|---|
| 51 | 51 | half4 tmpvar_24; |
| 52 | 52 | tmpvar_24 = _MainTex.sample(_mtlsmp__MainTex, (float2)(tmpvar_23.xy), level(0.0)); |
| 53 | 53 | half tmpvar_25; |
| 54 | tmpvar_25 = ((tmpvar_17.y * (half)1.96321) + tmpvar_17.x); | |
| 54 | tmpvar_25 = ((tmpvar_17.y * (half)1.963211) + tmpvar_17.x); | |
| 55 | 55 | lumaN_15 = tmpvar_25; |
| 56 | 56 | half tmpvar_26; |
| 57 | tmpvar_26 = ((tmpvar_19.y * (half)1.96321) + tmpvar_19.x); | |
| 57 | tmpvar_26 = ((tmpvar_19.y * (half)1.963211) + tmpvar_19.x); | |
| 58 | 58 | half tmpvar_27; |
| 59 | tmpvar_27 = ((tmpvar_20.y * (half)1.96321) + tmpvar_20.x); | |
| 59 | tmpvar_27 = ((tmpvar_20.y * (half)1.963211) + tmpvar_20.x); | |
| 60 | 60 | half tmpvar_28; |
| 61 | tmpvar_28 = ((tmpvar_22.y * (half)1.96321) + tmpvar_22.x); | |
| 61 | tmpvar_28 = ((tmpvar_22.y * (half)1.963211) + tmpvar_22.x); | |
| 62 | 62 | half tmpvar_29; |
| 63 | tmpvar_29 = ((tmpvar_24.y * (half)1.96321) + tmpvar_24.x); | |
| 63 | tmpvar_29 = ((tmpvar_24.y * (half)1.963211) + tmpvar_24.x); | |
| 64 | 64 | lumaS_14 = tmpvar_29; |
| 65 | 65 | half tmpvar_30; |
| 66 | 66 | tmpvar_30 = max (max (tmpvar_27, tmpvar_25), max (max (tmpvar_26, tmpvar_29), tmpvar_28)); |
| r245594 | r245595 | |
| 69 | 69 | min (tmpvar_26, tmpvar_29) |
| 70 | 70 | , tmpvar_28))); |
| 71 | 71 | half tmpvar_32; |
| 72 | tmpvar_32 = max ((half)0.0416667, (tmpvar_30 * (half)0.125)); | |
| 72 | tmpvar_32 = max ((half)0.04166667, (tmpvar_30 * (half)0.125)); | |
| 73 | 73 | if ((tmpvar_31 < tmpvar_32)) { |
| 74 | 74 | tmpvar_2 = tmpvar_20.xyz; |
| 75 | 75 | } else { |
| r245594 | r245595 | |
| 78 | 78 | ((abs(( |
| 79 | 79 | (((tmpvar_25 + tmpvar_26) + (tmpvar_28 + tmpvar_29)) * (half)0.25) |
| 80 | 80 | - tmpvar_27)) / tmpvar_31) - (half)0.25) |
| 81 | ) * (half)1.33333)); | |
| 81 | ) * (half)1.333333)); | |
| 82 | 82 | float4 tmpvar_34; |
| 83 | 83 | tmpvar_34.zw = float2(0.0, 0.0); |
| 84 | 84 | tmpvar_34.xy = (_mtl_i.xlv_TEXCOORD0 - _mtl_u._MainTex_TexelSize.xy); |
| r245594 | r245595 | |
| 102 | 102 | rgbL_13 = (((tmpvar_17.xyz + tmpvar_19.xyz) + (tmpvar_20.xyz + tmpvar_22.xyz)) + ((tmpvar_24.xyz + tmpvar_35.xyz) + ( |
| 103 | 103 | (tmpvar_37.xyz + tmpvar_39.xyz) |
| 104 | 104 | + tmpvar_41.xyz))); |
| 105 | rgbL_13 = (rgbL_13 * (half3)float3(0.111111, 0.111111, 0.111111)); | |
| 105 | rgbL_13 = (rgbL_13 * (half3)float3(0.1111111, 0.1111111, 0.1111111)); | |
| 106 | 106 | half tmpvar_42; |
| 107 | tmpvar_42 = ((tmpvar_35.y * (half)1.96321) + tmpvar_35.x); | |
| 107 | tmpvar_42 = ((tmpvar_35.y * (half)1.963211) + tmpvar_35.x); | |
| 108 | 108 | half tmpvar_43; |
| 109 | tmpvar_43 = ((tmpvar_37.y * (half)1.96321) + tmpvar_37.x); | |
| 109 | tmpvar_43 = ((tmpvar_37.y * (half)1.963211) + tmpvar_37.x); | |
| 110 | 110 | half tmpvar_44; |
| 111 | tmpvar_44 = ((tmpvar_39.y * (half)1.96321) + tmpvar_39.x); | |
| 111 | tmpvar_44 = ((tmpvar_39.y * (half)1.963211) + tmpvar_39.x); | |
| 112 | 112 | half tmpvar_45; |
| 113 | tmpvar_45 = ((tmpvar_41.y * (half)1.96321) + tmpvar_41.x); | |
| 113 | tmpvar_45 = ((tmpvar_41.y * (half)1.963211) + tmpvar_41.x); | |
| 114 | 114 | bool tmpvar_46; |
| 115 | 115 | tmpvar_46 = ((( |
| 116 | 116 | abs(((((half)0.25 * tmpvar_42) + ((half)-0.5 * tmpvar_26)) + ((half)0.25 * tmpvar_44))) |
| r245594 | r245595 | |
| 195 | 195 | if (!(doneN_5)) { |
| 196 | 196 | half4 tmpvar_56; |
| 197 | 197 | tmpvar_56 = _MainTex.sample(_mtlsmp__MainTex, (float2)(posN_10), level(0.0)); |
| 198 | lumaEndN_7 = ((tmpvar_56.y * (half)1.96321) + tmpvar_56.x); | |
| 198 | lumaEndN_7 = ((tmpvar_56.y * (half)1.963211) + tmpvar_56.x); | |
| 199 | 199 | }; |
| 200 | 200 | if (!(doneP_4)) { |
| 201 | 201 | half4 tmpvar_57; |
| 202 | 202 | tmpvar_57 = _MainTex.sample(_mtlsmp__MainTex, (float2)(posP_9), level(0.0)); |
| 203 | lumaEndP_6 = ((tmpvar_57.y * (half)1.96321) + tmpvar_57.x); | |
| 203 | lumaEndP_6 = ((tmpvar_57.y * (half)1.963211) + tmpvar_57.x); | |
| 204 | 204 | }; |
| 205 | 205 | bool tmpvar_58; |
| 206 | 206 | if (doneN_5) { |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | #extension GL_EXT_shader_texture_lod : enable |
| 2 | lowp vec4 impl_low_texture2DLodEXT(lowp sampler2D sampler, highp vec2 coord, mediump float lod) | |
| 3 | { | |
| 4 | #if defined(GL_EXT_shader_texture_lod) | |
| 5 | return texture2DLodEXT(sampler, coord, lod); | |
| 6 | #else | |
| 7 | return texture2D(sampler, coord, lod); | |
| 8 | #endif | |
| 9 | } | |
| 10 | ||
| 2 | 11 | uniform sampler2D _MainTex; |
| 3 | 12 | uniform highp vec4 _MainTex_TexelSize; |
| 4 | 13 | varying highp vec2 xlv_TEXCOORD0; |
| r245594 | r245595 | |
| 19 | 28 | highp float lumaM_10; |
| 20 | 29 | highp float lumaNe_11; |
| 21 | 30 | lowp vec4 tmpvar_12; |
| 22 | tmpvar_12 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xy, 0.0); | |
| 31 | tmpvar_12 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xy, 0.0); | |
| 23 | 32 | highp float tmpvar_13; |
| 24 | 33 | tmpvar_13 = tmpvar_12.y; |
| 25 | 34 | lowp vec4 tmpvar_14; |
| 26 | tmpvar_14 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xw, 0.0); | |
| 35 | tmpvar_14 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD1.xw, 0.0); | |
| 27 | 36 | highp float tmpvar_15; |
| 28 | 37 | tmpvar_15 = tmpvar_14.y; |
| 29 | 38 | lowp vec4 tmpvar_16; |
| 30 | tmpvar_16 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zy, 0.0); | |
| 39 | tmpvar_16 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zy, 0.0); | |
| 31 | 40 | highp float tmpvar_17; |
| 32 | 41 | tmpvar_17 = tmpvar_16.y; |
| 33 | 42 | lowp vec4 tmpvar_18; |
| 34 | tmpvar_18 = texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zw, 0.0); | |
| 43 | tmpvar_18 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD1.zw, 0.0); | |
| 35 | 44 | highp float tmpvar_19; |
| 36 | 45 | tmpvar_19 = tmpvar_18.y; |
| 37 | 46 | lowp vec4 tmpvar_20; |
| 38 | tmpvar_20 = texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0); | |
| 47 | tmpvar_20 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0); | |
| 39 | 48 | lumaM_10 = tmpvar_20.y; |
| 40 | 49 | lumaNe_11 = (tmpvar_17 + 0.00260417); |
| 41 | 50 | highp float tmpvar_21; |
| r245594 | r245595 | |
| 70 | 79 | highp vec4 tmpvar_29; |
| 71 | 80 | tmpvar_29.zw = vec2(0.0, 0.0); |
| 72 | 81 | tmpvar_29.xy = (xlv_TEXCOORD0 + (tmpvar_27 * fxaaConsoleRcpFrameOpt2_2.zw)); |
| 73 | rgbyA_5 = (texture2DLodEXT (_MainTex, tmpvar_25.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_26.xy, 0.0)); | |
| 74 | rgbyB_4 = (((texture2DLodEXT (_MainTex, tmpvar_28.xy, 0.0) + texture2DLodEXT (_MainTex, tmpvar_29.xy, 0.0)) * 0.25) + (rgbyA_5 * 0.25)); | |
| 82 | rgbyA_5 = (impl_low_texture2DLodEXT (_MainTex, tmpvar_25.xy, 0.0) + impl_low_texture2DLodEXT (_MainTex, tmpvar_26.xy, 0.0)); | |
| 83 | rgbyB_4 = (((impl_low_texture2DLodEXT (_MainTex, tmpvar_28.xy, 0.0) + impl_low_texture2DLodEXT (_MainTex, tmpvar_29.xy, 0.0)) * 0.25) + (rgbyA_5 * 0.25)); | |
| 75 | 84 | if (((rgbyB_4.y < tmpvar_22) || (rgbyB_4.y > tmpvar_21))) { |
| 76 | 85 | rgbyB_4.xyz = (rgbyA_5.xyz * 0.5); |
| 77 | 86 | }; |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | #extension GL_EXT_shader_texture_lod : enable |
| 2 | lowp vec4 impl_low_texture2DLodEXT(lowp sampler2D sampler, highp vec2 coord, mediump float lod) | |
| 3 | { | |
| 4 | #if defined(GL_EXT_shader_texture_lod) | |
| 5 | return texture2DLodEXT(sampler, coord, lod); | |
| 6 | #else | |
| 7 | return texture2D(sampler, coord, lod); | |
| 8 | #endif | |
| 9 | } | |
| 10 | ||
| 2 | 11 | uniform sampler2D _MainTex; |
| 3 | 12 | uniform highp vec4 _MainTex_TexelSize; |
| 4 | 13 | varying highp vec2 xlv_TEXCOORD0; |
| r245594 | r245595 | |
| 48 | 57 | highp vec2 posM_41; |
| 49 | 58 | posM_41 = xlv_TEXCOORD0; |
| 50 | 59 | lowp vec4 tmpvar_42; |
| 51 | tmpvar_42 = texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0); | |
| 60 | tmpvar_42 = impl_low_texture2DLodEXT (_MainTex, xlv_TEXCOORD0, 0.0); | |
| 52 | 61 | rgbyM_40 = tmpvar_42; |
| 53 | 62 | highp vec4 tmpvar_43; |
| 54 | 63 | tmpvar_43.zw = vec2(0.0, 0.0); |
| 55 | 64 | tmpvar_43.xy = (xlv_TEXCOORD0 + (vec2(0.0, 1.0) * _MainTex_TexelSize.xy)); |
| 56 | 65 | lowp vec4 tmpvar_44; |
| 57 | tmpvar_44 = texture2DLodEXT (_MainTex, tmpvar_43.xy, 0.0); | |
| 66 | tmpvar_44 = impl_low_texture2DLodEXT (_MainTex, tmpvar_43.xy, 0.0); | |
| 58 | 67 | highp vec4 rgba_45; |
| 59 | 68 | rgba_45 = tmpvar_44; |
| 60 | 69 | lumaS_39 = rgba_45.w; |
| r245594 | r245595 | |
| 62 | 71 | tmpvar_46.zw = vec2(0.0, 0.0); |
| 63 | 72 | tmpvar_46.xy = (xlv_TEXCOORD0 + (vec2(1.0, 0.0) * _MainTex_TexelSize.xy)); |
| 64 | 73 | lowp vec4 tmpvar_47; |
| 65 | tmpvar_47 = texture2DLodEXT (_MainTex, tmpvar_46.xy, 0.0); | |
| 74 | tmpvar_47 = impl_low_texture2DLodEXT (_MainTex, tmpvar_46.xy, 0.0); | |
| 66 | 75 | highp float tmpvar_48; |
| 67 | 76 | highp vec4 rgba_49; |
| 68 | 77 | rgba_49 = tmpvar_47; |
| r245594 | r245595 | |
| 71 | 80 | tmpvar_50.zw = vec2(0.0, 0.0); |
| 72 | 81 | tmpvar_50.xy = (xlv_TEXCOORD0 + (vec2(0.0, -1.0) * _MainTex_TexelSize.xy)); |
| 73 | 82 | lowp vec4 tmpvar_51; |
| 74 | tmpvar_51 = texture2DLodEXT (_MainTex, tmpvar_50.xy, 0.0); | |
| 83 | tmpvar_51 = impl_low_texture2DLodEXT (_MainTex, tmpvar_50.xy, 0.0); | |
| 75 | 84 | highp vec4 rgba_52; |
| 76 | 85 | rgba_52 = tmpvar_51; |
| 77 | 86 | lumaN_38 = rgba_52.w; |
| r245594 | r245595 | |
| 79 | 88 | tmpvar_53.zw = vec2(0.0, 0.0); |
| 80 | 89 | tmpvar_53.xy = (xlv_TEXCOORD0 + (vec2(-1.0, 0.0) * _MainTex_TexelSize.xy)); |
| 81 | 90 | lowp vec4 tmpvar_54; |
| 82 | tmpvar_54 = texture2DLodEXT (_MainTex, tmpvar_53.xy, 0.0); | |
| 91 | tmpvar_54 = impl_low_texture2DLodEXT (_MainTex, tmpvar_53.xy, 0.0); | |
| 83 | 92 | highp float tmpvar_55; |
| 84 | 93 | highp vec4 rgba_56; |
| 85 | 94 | rgba_56 = tmpvar_54; |
| r245594 | r245595 | |
| 96 | 105 | tmpvar_58.zw = vec2(0.0, 0.0); |
| 97 | 106 | tmpvar_58.xy = (xlv_TEXCOORD0 - _MainTex_TexelSize.xy); |
| 98 | 107 | lowp vec4 tmpvar_59; |
| 99 | tmpvar_59 = texture2DLodEXT (_MainTex, tmpvar_58.xy, 0.0); | |
| 108 | tmpvar_59 = impl_low_texture2DLodEXT (_MainTex, tmpvar_58.xy, 0.0); | |
| 100 | 109 | highp vec4 rgba_60; |
| 101 | 110 | rgba_60 = tmpvar_59; |
| 102 | 111 | highp vec4 tmpvar_61; |
| 103 | 112 | tmpvar_61.zw = vec2(0.0, 0.0); |
| 104 | 113 | tmpvar_61.xy = (xlv_TEXCOORD0 + _MainTex_TexelSize.xy); |
| 105 | 114 | lowp vec4 tmpvar_62; |
| 106 | tmpvar_62 = texture2DLodEXT (_MainTex, tmpvar_61.xy, 0.0); | |
| 115 | tmpvar_62 = impl_low_texture2DLodEXT (_MainTex, tmpvar_61.xy, 0.0); | |
| 107 | 116 | highp vec4 rgba_63; |
| 108 | 117 | rgba_63 = tmpvar_62; |
| 109 | 118 | highp vec4 tmpvar_64; |
| 110 | 119 | tmpvar_64.zw = vec2(0.0, 0.0); |
| 111 | 120 | tmpvar_64.xy = (xlv_TEXCOORD0 + (vec2(1.0, -1.0) * _MainTex_TexelSize.xy)); |
| 112 | 121 | lowp vec4 tmpvar_65; |
| 113 | tmpvar_65 = texture2DLodEXT (_MainTex, tmpvar_64.xy, 0.0); | |
| 122 | tmpvar_65 = impl_low_texture2DLodEXT (_MainTex, tmpvar_64.xy, 0.0); | |
| 114 | 123 | highp vec4 rgba_66; |
| 115 | 124 | rgba_66 = tmpvar_65; |
| 116 | 125 | highp vec4 tmpvar_67; |
| 117 | 126 | tmpvar_67.zw = vec2(0.0, 0.0); |
| 118 | 127 | tmpvar_67.xy = (xlv_TEXCOORD0 + (vec2(-1.0, 1.0) * _MainTex_TexelSize.xy)); |
| 119 | 128 | lowp vec4 tmpvar_68; |
| 120 | tmpvar_68 = texture2DLodEXT (_MainTex, tmpvar_67.xy, 0.0); | |
| 129 | tmpvar_68 = impl_low_texture2DLodEXT (_MainTex, tmpvar_67.xy, 0.0); | |
| 121 | 130 | highp vec4 rgba_69; |
| 122 | 131 | rgba_69 = tmpvar_68; |
| 123 | 132 | lumaNS_36 = (rgba_52.w + rgba_45.w); |
| r245594 | r245595 | |
| 187 | 196 | posP_20.y = (posB_22.y + tmpvar_73); |
| 188 | 197 | subpixD_19 = ((-2.0 * tmpvar_71) + 3.0); |
| 189 | 198 | lowp vec4 tmpvar_74; |
| 190 | tmpvar_74 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 199 | tmpvar_74 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 191 | 200 | highp vec4 rgba_75; |
| 192 | 201 | rgba_75 = tmpvar_74; |
| 193 | 202 | lumaEndN_18 = rgba_75.w; |
| 194 | 203 | subpixE_17 = (tmpvar_71 * tmpvar_71); |
| 195 | 204 | lowp vec4 tmpvar_76; |
| 196 | tmpvar_76 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 205 | tmpvar_76 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 197 | 206 | highp vec4 rgba_77; |
| 198 | 207 | rgba_77 = tmpvar_76; |
| 199 | 208 | lumaEndP_16 = rgba_77.w; |
| r245594 | r245595 | |
| 223 | 232 | if (doneNP_10) { |
| 224 | 233 | if (!(doneN_12)) { |
| 225 | 234 | lowp vec4 tmpvar_78; |
| 226 | tmpvar_78 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 235 | tmpvar_78 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 227 | 236 | highp vec4 rgba_79; |
| 228 | 237 | rgba_79 = tmpvar_78; |
| 229 | 238 | lumaEndN_18 = rgba_79.w; |
| 230 | 239 | }; |
| 231 | 240 | if (!(doneP_11)) { |
| 232 | 241 | lowp vec4 tmpvar_80; |
| 233 | tmpvar_80 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 242 | tmpvar_80 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 234 | 243 | highp vec4 rgba_81; |
| 235 | 244 | rgba_81 = tmpvar_80; |
| 236 | 245 | lumaEndP_16 = rgba_81.w; |
| r245594 | r245595 | |
| 259 | 268 | if (doneNP_10) { |
| 260 | 269 | if (!(doneN_12)) { |
| 261 | 270 | lowp vec4 tmpvar_82; |
| 262 | tmpvar_82 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 271 | tmpvar_82 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 263 | 272 | highp vec4 rgba_83; |
| 264 | 273 | rgba_83 = tmpvar_82; |
| 265 | 274 | lumaEndN_18 = rgba_83.w; |
| 266 | 275 | }; |
| 267 | 276 | if (!(doneP_11)) { |
| 268 | 277 | lowp vec4 tmpvar_84; |
| 269 | tmpvar_84 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 278 | tmpvar_84 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 270 | 279 | highp vec4 rgba_85; |
| 271 | 280 | rgba_85 = tmpvar_84; |
| 272 | 281 | lumaEndP_16 = rgba_85.w; |
| r245594 | r245595 | |
| 295 | 304 | if (doneNP_10) { |
| 296 | 305 | if (!(doneN_12)) { |
| 297 | 306 | lowp vec4 tmpvar_86; |
| 298 | tmpvar_86 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 307 | tmpvar_86 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 299 | 308 | highp vec4 rgba_87; |
| 300 | 309 | rgba_87 = tmpvar_86; |
| 301 | 310 | lumaEndN_18 = rgba_87.w; |
| 302 | 311 | }; |
| 303 | 312 | if (!(doneP_11)) { |
| 304 | 313 | lowp vec4 tmpvar_88; |
| 305 | tmpvar_88 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 314 | tmpvar_88 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 306 | 315 | highp vec4 rgba_89; |
| 307 | 316 | rgba_89 = tmpvar_88; |
| 308 | 317 | lumaEndP_16 = rgba_89.w; |
| r245594 | r245595 | |
| 331 | 340 | if (doneNP_10) { |
| 332 | 341 | if (!(doneN_12)) { |
| 333 | 342 | lowp vec4 tmpvar_90; |
| 334 | tmpvar_90 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 343 | tmpvar_90 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 335 | 344 | highp vec4 rgba_91; |
| 336 | 345 | rgba_91 = tmpvar_90; |
| 337 | 346 | lumaEndN_18 = rgba_91.w; |
| 338 | 347 | }; |
| 339 | 348 | if (!(doneP_11)) { |
| 340 | 349 | lowp vec4 tmpvar_92; |
| 341 | tmpvar_92 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 350 | tmpvar_92 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 342 | 351 | highp vec4 rgba_93; |
| 343 | 352 | rgba_93 = tmpvar_92; |
| 344 | 353 | lumaEndP_16 = rgba_93.w; |
| r245594 | r245595 | |
| 367 | 376 | if (doneNP_10) { |
| 368 | 377 | if (!(doneN_12)) { |
| 369 | 378 | lowp vec4 tmpvar_94; |
| 370 | tmpvar_94 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 379 | tmpvar_94 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 371 | 380 | highp vec4 rgba_95; |
| 372 | 381 | rgba_95 = tmpvar_94; |
| 373 | 382 | lumaEndN_18 = rgba_95.w; |
| 374 | 383 | }; |
| 375 | 384 | if (!(doneP_11)) { |
| 376 | 385 | lowp vec4 tmpvar_96; |
| 377 | tmpvar_96 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 386 | tmpvar_96 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 378 | 387 | highp vec4 rgba_97; |
| 379 | 388 | rgba_97 = tmpvar_96; |
| 380 | 389 | lumaEndP_16 = rgba_97.w; |
| r245594 | r245595 | |
| 403 | 412 | if (doneNP_10) { |
| 404 | 413 | if (!(doneN_12)) { |
| 405 | 414 | lowp vec4 tmpvar_98; |
| 406 | tmpvar_98 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 415 | tmpvar_98 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 407 | 416 | highp vec4 rgba_99; |
| 408 | 417 | rgba_99 = tmpvar_98; |
| 409 | 418 | lumaEndN_18 = rgba_99.w; |
| 410 | 419 | }; |
| 411 | 420 | if (!(doneP_11)) { |
| 412 | 421 | lowp vec4 tmpvar_100; |
| 413 | tmpvar_100 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 422 | tmpvar_100 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 414 | 423 | highp vec4 rgba_101; |
| 415 | 424 | rgba_101 = tmpvar_100; |
| 416 | 425 | lumaEndP_16 = rgba_101.w; |
| r245594 | r245595 | |
| 439 | 448 | if (doneNP_10) { |
| 440 | 449 | if (!(doneN_12)) { |
| 441 | 450 | lowp vec4 tmpvar_102; |
| 442 | tmpvar_102 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 451 | tmpvar_102 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 443 | 452 | highp vec4 rgba_103; |
| 444 | 453 | rgba_103 = tmpvar_102; |
| 445 | 454 | lumaEndN_18 = rgba_103.w; |
| 446 | 455 | }; |
| 447 | 456 | if (!(doneP_11)) { |
| 448 | 457 | lowp vec4 tmpvar_104; |
| 449 | tmpvar_104 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 458 | tmpvar_104 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 450 | 459 | highp vec4 rgba_105; |
| 451 | 460 | rgba_105 = tmpvar_104; |
| 452 | 461 | lumaEndP_16 = rgba_105.w; |
| r245594 | r245595 | |
| 475 | 484 | if (doneNP_10) { |
| 476 | 485 | if (!(doneN_12)) { |
| 477 | 486 | lowp vec4 tmpvar_106; |
| 478 | tmpvar_106 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 487 | tmpvar_106 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 479 | 488 | highp vec4 rgba_107; |
| 480 | 489 | rgba_107 = tmpvar_106; |
| 481 | 490 | lumaEndN_18 = rgba_107.w; |
| 482 | 491 | }; |
| 483 | 492 | if (!(doneP_11)) { |
| 484 | 493 | lowp vec4 tmpvar_108; |
| 485 | tmpvar_108 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 494 | tmpvar_108 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 486 | 495 | highp vec4 rgba_109; |
| 487 | 496 | rgba_109 = tmpvar_108; |
| 488 | 497 | lumaEndP_16 = rgba_109.w; |
| r245594 | r245595 | |
| 511 | 520 | if (doneNP_10) { |
| 512 | 521 | if (!(doneN_12)) { |
| 513 | 522 | lowp vec4 tmpvar_110; |
| 514 | tmpvar_110 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 523 | tmpvar_110 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 515 | 524 | highp vec4 rgba_111; |
| 516 | 525 | rgba_111 = tmpvar_110; |
| 517 | 526 | lumaEndN_18 = rgba_111.w; |
| 518 | 527 | }; |
| 519 | 528 | if (!(doneP_11)) { |
| 520 | 529 | lowp vec4 tmpvar_112; |
| 521 | tmpvar_112 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 530 | tmpvar_112 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 522 | 531 | highp vec4 rgba_113; |
| 523 | 532 | rgba_113 = tmpvar_112; |
| 524 | 533 | lumaEndP_16 = rgba_113.w; |
| r245594 | r245595 | |
| 547 | 556 | if (doneNP_10) { |
| 548 | 557 | if (!(doneN_12)) { |
| 549 | 558 | lowp vec4 tmpvar_114; |
| 550 | tmpvar_114 = texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 559 | tmpvar_114 = impl_low_texture2DLodEXT (_MainTex, posN_21, 0.0); | |
| 551 | 560 | highp vec4 rgba_115; |
| 552 | 561 | rgba_115 = tmpvar_114; |
| 553 | 562 | lumaEndN_18 = rgba_115.w; |
| 554 | 563 | }; |
| 555 | 564 | if (!(doneP_11)) { |
| 556 | 565 | lowp vec4 tmpvar_116; |
| 557 | tmpvar_116 = texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 566 | tmpvar_116 = impl_low_texture2DLodEXT (_MainTex, posP_20, 0.0); | |
| 558 | 567 | highp vec4 rgba_117; |
| 559 | 568 | rgba_117 = tmpvar_116; |
| 560 | 569 | lumaEndP_16 = rgba_117.w; |
| r245594 | r245595 | |
| 626 | 635 | posM_41.y = (xlv_TEXCOORD0.y + (tmpvar_121 * lengthSign_31)); |
| 627 | 636 | }; |
| 628 | 637 | lowp vec4 tmpvar_122; |
| 629 | tmpvar_122 = texture2DLodEXT (_MainTex, posM_41, 0.0); | |
| 638 | tmpvar_122 = impl_low_texture2DLodEXT (_MainTex, posM_41, 0.0); | |
| 630 | 639 | highp vec4 tmpvar_123; |
| 631 | 640 | tmpvar_123.xyz = tmpvar_122.xyz; |
| 632 | 641 | tmpvar_123.w = rgbyM_40.w; |
| r245594 | r245595 | |
|---|---|---|
| 69 | 69 | } |
| 70 | 70 | highp float SampleCubeDistance( in highp vec3 vec ) { |
| 71 | 71 | highp vec4 packDist; |
| 72 | packDist = texture | |
| 72 | packDist = texture( _ShadowMapTexture, vec); | |
| 73 | 73 | return DecodeFloatRGBA( packDist); |
| 74 | 74 | } |
| 75 | 75 | mediump float unitySampleShadow( in highp vec3 vec, in highp float mydist ) { |
| r245594 | r245595 | |
| 111 | 111 | highp float fade; |
| 112 | 112 | i.ray = (i.ray * (_ProjectionParams.z / i.ray.z )); |
| 113 | 113 | uv = (i.uv.xy / i.uv.w ); |
| 114 | nspec = texture | |
| 114 | nspec = texture( _CameraNormalsTexture, uv); | |
| 115 | 115 | normal = ((nspec.xyz * 2.00000) - 1.00000); |
| 116 | 116 | normal = normalize( normal ); |
| 117 | depth = texture | |
| 117 | depth = texture( _CameraDepthTexture, uv).x ; | |
| 118 | 118 | depth = Linear01Depth( depth); |
| 119 | 119 | vpos = vec4( (i.ray * depth), 1.00000); |
| 120 | 120 | wpos = ( _CameraToWorld * vpos ).xyz ; |
| 121 | 121 | tolight = (wpos - _LightPos.xyz ); |
| 122 | 122 | lightDir = ( -normalize( tolight ) ); |
| 123 | 123 | att = (dot( tolight, tolight) * _LightPos.w ); |
| 124 | atten = texture | |
| 124 | atten = texture( _LightTextureB0, vec2( vec2( att))).w ; | |
| 125 | 125 | atten *= ComputeShadow( tolight, vpos.z , uv); |
| 126 | atten *= texture | |
| 126 | atten *= texture( _LightTexture0, ( _LightMatrix0 * vec4( wpos, 1.00000) ).xyz ).w ; | |
| 127 | 127 | diff = max( 0.000000, dot( lightDir, normal)); |
| 128 | 128 | h = normalize( (lightDir - normalize( (wpos - _WorldSpaceCameraPos) )) ); |
| 129 | 129 | spec = pow( max( 0.000000, dot( h, normal)), (nspec.w * 128.000)); |
| r245594 | r245595 | |
|---|---|---|
| 56 | 56 | highp float mydist_19; |
| 57 | 57 | mydist_19 = (sqrt(dot (tolight_6, tolight_6)) * _LightPositionRange.w); |
| 58 | 58 | mydist_19 = (mydist_19 * 0.97); |
| 59 | mediump vec4 shadows_20; | |
| 60 | highp vec4 shadowVals_21; | |
| 61 | highp vec3 vec_22; | |
| 62 | vec_22 = (tolight_6 + vec3(0.0078125, 0.0078125, 0.0078125)); | |
| 63 | highp vec4 packDist_23; | |
| 64 | lowp vec4 tmpvar_24; | |
| 65 | tmpvar_24 = textureCube (_ShadowMapTexture, vec_22); | |
| 66 | packDist_23 = tmpvar_24; | |
| 67 | shadowVals_21.x = dot (packDist_23, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 68 | highp vec3 vec_25; | |
| 69 | vec_25 = (tolight_6 + vec3(-0.0078125, -0.0078125, 0.0078125)); | |
| 70 | highp vec4 packDist_26; | |
| 71 | lowp vec4 tmpvar_27; | |
| 72 | tmpvar_27 = textureCube (_ShadowMapTexture, vec_25); | |
| 73 | packDist_26 = tmpvar_27; | |
| 74 | shadowVals_21.y = dot (packDist_26, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 75 | highp vec3 vec_28; | |
| 76 | vec_28 = (tolight_6 + vec3(-0.0078125, 0.0078125, -0.0078125)); | |
| 77 | highp vec4 packDist_29; | |
| 78 | lowp vec4 tmpvar_30; | |
| 79 | tmpvar_30 = textureCube (_ShadowMapTexture, vec_28); | |
| 80 | packDist_29 = tmpvar_30; | |
| 81 | shadowVals_21.z = dot (packDist_29, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 82 | highp vec3 vec_31; | |
| 83 | vec_31 = (tolight_6 + vec3(0.0078125, -0.0078125, -0.0078125)); | |
| 84 | highp vec4 packDist_32; | |
| 85 | lowp vec4 tmpvar_33; | |
| 86 | tmpvar_33 = textureCube (_ShadowMapTexture, vec_31); | |
| 87 | packDist_32 = tmpvar_33; | |
| 88 | shadowVals_21.w = dot (packDist_32, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 89 | bvec4 tmpvar_34; | |
| 90 | tmpvar_34 = lessThan (shadowVals_21, vec4(mydist_19)); | |
| 91 | highp vec4 tmpvar_35; | |
| 92 | tmpvar_35 = _LightShadowData.xxxx; | |
| 59 | highp vec4 shadowVals_20; | |
| 60 | highp vec3 vec_21; | |
| 61 | vec_21 = (tolight_6 + vec3(0.0078125, 0.0078125, 0.0078125)); | |
| 62 | highp vec4 packDist_22; | |
| 63 | lowp vec4 tmpvar_23; | |
| 64 | tmpvar_23 = textureCube (_ShadowMapTexture, vec_21); | |
| 65 | packDist_22 = tmpvar_23; | |
| 66 | shadowVals_20.x = dot (packDist_22, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 67 | highp vec3 vec_24; | |
| 68 | vec_24 = (tolight_6 + vec3(-0.0078125, -0.0078125, 0.0078125)); | |
| 69 | highp vec4 packDist_25; | |
| 70 | lowp vec4 tmpvar_26; | |
| 71 | tmpvar_26 = textureCube (_ShadowMapTexture, vec_24); | |
| 72 | packDist_25 = tmpvar_26; | |
| 73 | shadowVals_20.y = dot (packDist_25, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 74 | highp vec3 vec_27; | |
| 75 | vec_27 = (tolight_6 + vec3(-0.0078125, 0.0078125, -0.0078125)); | |
| 76 | highp vec4 packDist_28; | |
| 77 | lowp vec4 tmpvar_29; | |
| 78 | tmpvar_29 = textureCube (_ShadowMapTexture, vec_27); | |
| 79 | packDist_28 = tmpvar_29; | |
| 80 | shadowVals_20.z = dot (packDist_28, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 81 | highp vec3 vec_30; | |
| 82 | vec_30 = (tolight_6 + vec3(0.0078125, -0.0078125, -0.0078125)); | |
| 83 | highp vec4 packDist_31; | |
| 84 | lowp vec4 tmpvar_32; | |
| 85 | tmpvar_32 = textureCube (_ShadowMapTexture, vec_30); | |
| 86 | packDist_31 = tmpvar_32; | |
| 87 | shadowVals_20.w = dot (packDist_31, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 88 | bvec4 tmpvar_33; | |
| 89 | tmpvar_33 = lessThan (shadowVals_20, vec4(mydist_19)); | |
| 90 | highp vec4 tmpvar_34; | |
| 91 | tmpvar_34 = _LightShadowData.xxxx; | |
| 92 | highp float tmpvar_35; | |
| 93 | if (tmpvar_33.x) { | |
| 94 | tmpvar_35 = tmpvar_34.x; | |
| 95 | } else { | |
| 96 | tmpvar_35 = 1.0; | |
| 97 | }; | |
| 93 | 98 | highp float tmpvar_36; |
| 94 | if (tmpvar_34.x) { | |
| 95 | tmpvar_36 = tmpvar_35.x; | |
| 99 | if (tmpvar_33.y) { | |
| 100 | tmpvar_36 = tmpvar_34.y; | |
| 96 | 101 | } else { |
| 97 | 102 | tmpvar_36 = 1.0; |
| 98 | 103 | }; |
| 99 | 104 | highp float tmpvar_37; |
| 100 | if (tmpvar_34.y) { | |
| 101 | tmpvar_37 = tmpvar_35.y; | |
| 105 | if (tmpvar_33.z) { | |
| 106 | tmpvar_37 = tmpvar_34.z; | |
| 102 | 107 | } else { |
| 103 | 108 | tmpvar_37 = 1.0; |
| 104 | 109 | }; |
| 105 | 110 | highp float tmpvar_38; |
| 106 | if (tmpvar_34.z) { | |
| 107 | tmpvar_38 = tmpvar_35.z; | |
| 111 | if (tmpvar_33.w) { | |
| 112 | tmpvar_38 = tmpvar_34.w; | |
| 108 | 113 | } else { |
| 109 | 114 | tmpvar_38 = 1.0; |
| 110 | 115 | }; |
| 111 | highp float tmpvar_39; | |
| 112 | if (tmpvar_34.w) { | |
| 113 | tmpvar_39 = tmpvar_35.w; | |
| 114 | } else { | |
| 115 | tmpvar_39 = 1.0; | |
| 116 | }; | |
| 117 | highp vec4 tmpvar_40; | |
| 118 | tmpvar_40.x = tmpvar_36; | |
| 119 | tmpvar_40.y = tmpvar_37; | |
| 120 | tmpvar_40.z = tmpvar_38; | |
| 121 | tmpvar_40.w = tmpvar_39; | |
| 122 | shadows_20 = tmpvar_40; | |
| 123 | mediump float tmpvar_41; | |
| 124 | tmpvar_41 = dot (shadows_20, vec4(0.25, 0.25, 0.25, 0.25)); | |
| 125 | atten_4 = (atten_4 * tmpvar_41); | |
| 126 | highp vec4 tmpvar_42; | |
| 127 | tmpvar_42.w = 1.0; | |
| 128 | tmpvar_42.xyz = wpos_7; | |
| 129 | lowp vec4 tmpvar_43; | |
| 130 | highp vec3 P_44; | |
| 131 | P_44 = (_LightMatrix0 * tmpvar_42).xyz; | |
| 132 | tmpvar_43 = textureCube (_LightTexture0, P_44); | |
| 133 | atten_4 = (atten_4 * tmpvar_43.w); | |
| 134 | highp vec3 tmpvar_45; | |
| 135 | tmpvar_45 = normalize((lightDir_5 - normalize( | |
| 116 | mediump vec4 tmpvar_39; | |
| 117 | tmpvar_39.x = tmpvar_35; | |
| 118 | tmpvar_39.y = tmpvar_36; | |
| 119 | tmpvar_39.z = tmpvar_37; | |
| 120 | tmpvar_39.w = tmpvar_38; | |
| 121 | mediump float tmpvar_40; | |
| 122 | tmpvar_40 = dot (tmpvar_39, vec4(0.25, 0.25, 0.25, 0.25)); | |
| 123 | atten_4 = (atten_4 * tmpvar_40); | |
| 124 | highp vec4 tmpvar_41; | |
| 125 | tmpvar_41.w = 1.0; | |
| 126 | tmpvar_41.xyz = wpos_7; | |
| 127 | lowp vec4 tmpvar_42; | |
| 128 | highp vec3 P_43; | |
| 129 | P_43 = (_LightMatrix0 * tmpvar_41).xyz; | |
| 130 | tmpvar_42 = textureCube (_LightTexture0, P_43); | |
| 131 | atten_4 = (atten_4 * tmpvar_42.w); | |
| 132 | highp vec3 tmpvar_44; | |
| 133 | tmpvar_44 = normalize((lightDir_5 - normalize( | |
| 136 | 134 | (wpos_7 - _WorldSpaceCameraPos) |
| 137 | 135 | ))); |
| 138 | h_3 = tmpvar_45; | |
| 139 | mediump float tmpvar_46; | |
| 140 | tmpvar_46 = pow (max (0.0, dot (h_3, normal_9)), (nspec_10.w * 128.0)); | |
| 141 | spec_2 = tmpvar_46; | |
| 136 | h_3 = tmpvar_44; | |
| 137 | mediump float tmpvar_45; | |
| 138 | tmpvar_45 = pow (max (0.0, dot (h_3, normal_9)), (nspec_10.w * 128.0)); | |
| 139 | spec_2 = tmpvar_45; | |
| 142 | 140 | spec_2 = (spec_2 * clamp (atten_4, 0.0, 1.0)); |
| 143 | 141 | res_1.xyz = (_LightColor.xyz * (max (0.0, |
| 144 | 142 | dot (lightDir_5, normal_9) |
| 145 | 143 | ) * atten_4)); |
| 146 | mediump vec3 c_47; | |
| 147 | c_47 = _LightColor.xyz; | |
| 148 | res_1.w = (spec_2 * dot (c_47, vec3(0.22, 0.707, 0.071))); | |
| 149 | highp float tmpvar_48; | |
| 150 | tmpvar_48 = clamp ((1.0 - ( | |
| 144 | mediump vec3 c_46; | |
| 145 | c_46 = _LightColor.xyz; | |
| 146 | res_1.w = (spec_2 * dot (c_46, vec3(0.22, 0.707, 0.071))); | |
| 147 | highp float tmpvar_47; | |
| 148 | tmpvar_47 = clamp ((1.0 - ( | |
| 151 | 149 | (tmpvar_15.z * unity_LightmapFade.z) |
| 152 | 150 | + unity_LightmapFade.w)), 0.0, 1.0); |
| 153 | res_1 = (res_1 * tmpvar_4 | |
| 151 | res_1 = (res_1 * tmpvar_47); | |
| 154 | 152 | gl_FragData[0] = exp2(-(res_1)); |
| 155 | 153 | } |
| 156 | 154 |
| r245594 | r245595 | |
|---|---|---|
| 58 | 58 | highp float mydist_19; |
| 59 | 59 | mydist_19 = (sqrt(dot (tolight_6, tolight_6)) * _LightPositionRange.w); |
| 60 | 60 | mydist_19 = (mydist_19 * 0.97); |
| 61 | mediump vec4 shadows_20; | |
| 62 | highp vec4 shadowVals_21; | |
| 63 | highp vec3 vec_22; | |
| 64 | vec_22 = (tolight_6 + vec3(0.0078125, 0.0078125, 0.0078125)); | |
| 65 | highp vec4 packDist_23; | |
| 66 | lowp vec4 tmpvar_24; | |
| 67 | tmpvar_24 = texture (_ShadowMapTexture, vec_22); | |
| 68 | packDist_23 = tmpvar_24; | |
| 69 | shadowVals_21.x = dot (packDist_23, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 70 | highp vec3 vec_25; | |
| 71 | vec_25 = (tolight_6 + vec3(-0.0078125, -0.0078125, 0.0078125)); | |
| 72 | highp vec4 packDist_26; | |
| 73 | lowp vec4 tmpvar_27; | |
| 74 | tmpvar_27 = texture (_ShadowMapTexture, vec_25); | |
| 75 | packDist_26 = tmpvar_27; | |
| 76 | shadowVals_21.y = dot (packDist_26, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 77 | highp vec3 vec_28; | |
| 78 | vec_28 = (tolight_6 + vec3(-0.0078125, 0.0078125, -0.0078125)); | |
| 79 | highp vec4 packDist_29; | |
| 80 | lowp vec4 tmpvar_30; | |
| 81 | tmpvar_30 = texture (_ShadowMapTexture, vec_28); | |
| 82 | packDist_29 = tmpvar_30; | |
| 83 | shadowVals_21.z = dot (packDist_29, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 84 | highp vec3 vec_31; | |
| 85 | vec_31 = (tolight_6 + vec3(0.0078125, -0.0078125, -0.0078125)); | |
| 86 | highp vec4 packDist_32; | |
| 87 | lowp vec4 tmpvar_33; | |
| 88 | tmpvar_33 = texture (_ShadowMapTexture, vec_31); | |
| 89 | packDist_32 = tmpvar_33; | |
| 90 | shadowVals_21.w = dot (packDist_32, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 91 | bvec4 tmpvar_34; | |
| 92 | tmpvar_34 = lessThan (shadowVals_21, vec4(mydist_19)); | |
| 93 | highp vec4 tmpvar_35; | |
| 94 | tmpvar_35 = _LightShadowData.xxxx; | |
| 61 | highp vec4 shadowVals_20; | |
| 62 | highp vec3 vec_21; | |
| 63 | vec_21 = (tolight_6 + vec3(0.0078125, 0.0078125, 0.0078125)); | |
| 64 | highp vec4 packDist_22; | |
| 65 | lowp vec4 tmpvar_23; | |
| 66 | tmpvar_23 = texture (_ShadowMapTexture, vec_21); | |
| 67 | packDist_22 = tmpvar_23; | |
| 68 | shadowVals_20.x = dot (packDist_22, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 69 | highp vec3 vec_24; | |
| 70 | vec_24 = (tolight_6 + vec3(-0.0078125, -0.0078125, 0.0078125)); | |
| 71 | highp vec4 packDist_25; | |
| 72 | lowp vec4 tmpvar_26; | |
| 73 | tmpvar_26 = texture (_ShadowMapTexture, vec_24); | |
| 74 | packDist_25 = tmpvar_26; | |
| 75 | shadowVals_20.y = dot (packDist_25, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 76 | highp vec3 vec_27; | |
| 77 | vec_27 = (tolight_6 + vec3(-0.0078125, 0.0078125, -0.0078125)); | |
| 78 | highp vec4 packDist_28; | |
| 79 | lowp vec4 tmpvar_29; | |
| 80 | tmpvar_29 = texture (_ShadowMapTexture, vec_27); | |
| 81 | packDist_28 = tmpvar_29; | |
| 82 | shadowVals_20.z = dot (packDist_28, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 83 | highp vec3 vec_30; | |
| 84 | vec_30 = (tolight_6 + vec3(0.0078125, -0.0078125, -0.0078125)); | |
| 85 | highp vec4 packDist_31; | |
| 86 | lowp vec4 tmpvar_32; | |
| 87 | tmpvar_32 = texture (_ShadowMapTexture, vec_30); | |
| 88 | packDist_31 = tmpvar_32; | |
| 89 | shadowVals_20.w = dot (packDist_31, vec4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 90 | bvec4 tmpvar_33; | |
| 91 | tmpvar_33 = lessThan (shadowVals_20, vec4(mydist_19)); | |
| 92 | highp vec4 tmpvar_34; | |
| 93 | tmpvar_34 = _LightShadowData.xxxx; | |
| 94 | highp float tmpvar_35; | |
| 95 | if (tmpvar_33.x) { | |
| 96 | tmpvar_35 = tmpvar_34.x; | |
| 97 | } else { | |
| 98 | tmpvar_35 = 1.0; | |
| 99 | }; | |
| 95 | 100 | highp float tmpvar_36; |
| 96 | if (tmpvar_34.x) { | |
| 97 | tmpvar_36 = tmpvar_35.x; | |
| 101 | if (tmpvar_33.y) { | |
| 102 | tmpvar_36 = tmpvar_34.y; | |
| 98 | 103 | } else { |
| 99 | 104 | tmpvar_36 = 1.0; |
| 100 | 105 | }; |
| 101 | 106 | highp float tmpvar_37; |
| 102 | if (tmpvar_34.y) { | |
| 103 | tmpvar_37 = tmpvar_35.y; | |
| 107 | if (tmpvar_33.z) { | |
| 108 | tmpvar_37 = tmpvar_34.z; | |
| 104 | 109 | } else { |
| 105 | 110 | tmpvar_37 = 1.0; |
| 106 | 111 | }; |
| 107 | 112 | highp float tmpvar_38; |
| 108 | if (tmpvar_34.z) { | |
| 109 | tmpvar_38 = tmpvar_35.z; | |
| 113 | if (tmpvar_33.w) { | |
| 114 | tmpvar_38 = tmpvar_34.w; | |
| 110 | 115 | } else { |
| 111 | 116 | tmpvar_38 = 1.0; |
| 112 | 117 | }; |
| 113 | highp float tmpvar_39; | |
| 114 | if (tmpvar_34.w) { | |
| 115 | tmpvar_39 = tmpvar_35.w; | |
| 116 | } else { | |
| 117 | tmpvar_39 = 1.0; | |
| 118 | }; | |
| 119 | highp vec4 tmpvar_40; | |
| 120 | tmpvar_40.x = tmpvar_36; | |
| 121 | tmpvar_40.y = tmpvar_37; | |
| 122 | tmpvar_40.z = tmpvar_38; | |
| 123 | tmpvar_40.w = tmpvar_39; | |
| 124 | shadows_20 = tmpvar_40; | |
| 125 | mediump float tmpvar_41; | |
| 126 | tmpvar_41 = dot (shadows_20, vec4(0.25, 0.25, 0.25, 0.25)); | |
| 127 | atten_4 = (atten_4 * tmpvar_41); | |
| 128 | highp vec4 tmpvar_42; | |
| 129 | tmpvar_42.w = 1.0; | |
| 130 | tmpvar_42.xyz = wpos_7; | |
| 131 | lowp vec4 tmpvar_43; | |
| 132 | highp vec3 P_44; | |
| 133 | P_44 = (_LightMatrix0 * tmpvar_42).xyz; | |
| 134 | tmpvar_43 = texture (_LightTexture0, P_44); | |
| 135 | atten_4 = (atten_4 * tmpvar_43.w); | |
| 136 | highp vec3 tmpvar_45; | |
| 137 | tmpvar_45 = normalize((lightDir_5 - normalize( | |
| 118 | mediump vec4 tmpvar_39; | |
| 119 | tmpvar_39.x = tmpvar_35; | |
| 120 | tmpvar_39.y = tmpvar_36; | |
| 121 | tmpvar_39.z = tmpvar_37; | |
| 122 | tmpvar_39.w = tmpvar_38; | |
| 123 | mediump float tmpvar_40; | |
| 124 | tmpvar_40 = dot (tmpvar_39, vec4(0.25, 0.25, 0.25, 0.25)); | |
| 125 | atten_4 = (atten_4 * tmpvar_40); | |
| 126 | highp vec4 tmpvar_41; | |
| 127 | tmpvar_41.w = 1.0; | |
| 128 | tmpvar_41.xyz = wpos_7; | |
| 129 | lowp vec4 tmpvar_42; | |
| 130 | highp vec3 P_43; | |
| 131 | P_43 = (_LightMatrix0 * tmpvar_41).xyz; | |
| 132 | tmpvar_42 = texture (_LightTexture0, P_43); | |
| 133 | atten_4 = (atten_4 * tmpvar_42.w); | |
| 134 | highp vec3 tmpvar_44; | |
| 135 | tmpvar_44 = normalize((lightDir_5 - normalize( | |
| 138 | 136 | (wpos_7 - _WorldSpaceCameraPos) |
| 139 | 137 | ))); |
| 140 | h_3 = tmpvar_45; | |
| 141 | mediump float tmpvar_46; | |
| 142 | tmpvar_46 = pow (max (0.0, dot (h_3, normal_9)), (nspec_10.w * 128.0)); | |
| 143 | spec_2 = tmpvar_46; | |
| 138 | h_3 = tmpvar_44; | |
| 139 | mediump float tmpvar_45; | |
| 140 | tmpvar_45 = pow (max (0.0, dot (h_3, normal_9)), (nspec_10.w * 128.0)); | |
| 141 | spec_2 = tmpvar_45; | |
| 144 | 142 | spec_2 = (spec_2 * clamp (atten_4, 0.0, 1.0)); |
| 145 | 143 | res_1.xyz = (_LightColor.xyz * (max (0.0, |
| 146 | 144 | dot (lightDir_5, normal_9) |
| 147 | 145 | ) * atten_4)); |
| 148 | mediump vec3 c_47; | |
| 149 | c_47 = _LightColor.xyz; | |
| 150 | res_1.w = (spec_2 * dot (c_47, vec3(0.22, 0.707, 0.071))); | |
| 151 | highp float tmpvar_48; | |
| 152 | tmpvar_48 = clamp ((1.0 - ( | |
| 146 | mediump vec3 c_46; | |
| 147 | c_46 = _LightColor.xyz; | |
| 148 | res_1.w = (spec_2 * dot (c_46, vec3(0.22, 0.707, 0.071))); | |
| 149 | highp float tmpvar_47; | |
| 150 | tmpvar_47 = clamp ((1.0 - ( | |
| 153 | 151 | (tmpvar_15.z * unity_LightmapFade.z) |
| 154 | 152 | + unity_LightmapFade.w)), 0.0, 1.0); |
| 155 | res_1 = (res_1 * tmpvar_4 | |
| 153 | res_1 = (res_1 * tmpvar_47); | |
| 156 | 154 | _fragData = exp2(-(res_1)); |
| 157 | 155 | } |
| 158 | 156 |
| r245594 | r245595 | |
|---|---|---|
| 66 | 66 | float mydist_19; |
| 67 | 67 | mydist_19 = (sqrt(dot (tolight_6, tolight_6)) * _mtl_u._LightPositionRange.w); |
| 68 | 68 | mydist_19 = (mydist_19 * 0.97); |
| 69 | half4 shadows_20; | |
| 70 | float4 shadowVals_21; | |
| 71 | float3 vec_22; | |
| 72 | vec_22 = (tolight_6 + float3(0.0078125, 0.0078125, 0.0078125)); | |
| 73 | float4 packDist_23; | |
| 74 | half4 tmpvar_24; | |
| 75 | tmpvar_24 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_22)); | |
| 76 | packDist_23 = float4(tmpvar_24); | |
| 77 | shadowVals_21.x = dot (packDist_23, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 78 | float3 vec_25; | |
| 79 | vec_25 = (tolight_6 + float3(-0.0078125, -0.0078125, 0.0078125)); | |
| 80 | float4 packDist_26; | |
| 81 | half4 tmpvar_27; | |
| 82 | tmpvar_27 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_25)); | |
| 83 | packDist_26 = float4(tmpvar_27); | |
| 84 | shadowVals_21.y = dot (packDist_26, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 85 | float3 vec_28; | |
| 86 | vec_28 = (tolight_6 + float3(-0.0078125, 0.0078125, -0.0078125)); | |
| 87 | float4 packDist_29; | |
| 88 | half4 tmpvar_30; | |
| 89 | tmpvar_30 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_28)); | |
| 90 | packDist_29 = float4(tmpvar_30); | |
| 91 | shadowVals_21.z = dot (packDist_29, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 92 | float3 vec_31; | |
| 93 | vec_31 = (tolight_6 + float3(0.0078125, -0.0078125, -0.0078125)); | |
| 94 | float4 packDist_32; | |
| 95 | half4 tmpvar_33; | |
| 96 | tmpvar_33 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_31)); | |
| 97 | packDist_32 = float4(tmpvar_33); | |
| 98 | shadowVals_21.w = dot (packDist_32, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 99 | bool4 tmpvar_34; | |
| 100 | tmpvar_34 = bool4((shadowVals_21 < float4(mydist_19))); | |
| 101 | float4 tmpvar_35; | |
| 102 | tmpvar_35 = _mtl_u._LightShadowData.xxxx; | |
| 69 | float4 shadowVals_20; | |
| 70 | float3 vec_21; | |
| 71 | vec_21 = (tolight_6 + float3(0.0078125, 0.0078125, 0.0078125)); | |
| 72 | float4 packDist_22; | |
| 73 | half4 tmpvar_23; | |
| 74 | tmpvar_23 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_21)); | |
| 75 | packDist_22 = float4(tmpvar_23); | |
| 76 | shadowVals_20.x = dot (packDist_22, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 77 | float3 vec_24; | |
| 78 | vec_24 = (tolight_6 + float3(-0.0078125, -0.0078125, 0.0078125)); | |
| 79 | float4 packDist_25; | |
| 80 | half4 tmpvar_26; | |
| 81 | tmpvar_26 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_24)); | |
| 82 | packDist_25 = float4(tmpvar_26); | |
| 83 | shadowVals_20.y = dot (packDist_25, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 84 | float3 vec_27; | |
| 85 | vec_27 = (tolight_6 + float3(-0.0078125, 0.0078125, -0.0078125)); | |
| 86 | float4 packDist_28; | |
| 87 | half4 tmpvar_29; | |
| 88 | tmpvar_29 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_27)); | |
| 89 | packDist_28 = float4(tmpvar_29); | |
| 90 | shadowVals_20.z = dot (packDist_28, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 91 | float3 vec_30; | |
| 92 | vec_30 = (tolight_6 + float3(0.0078125, -0.0078125, -0.0078125)); | |
| 93 | float4 packDist_31; | |
| 94 | half4 tmpvar_32; | |
| 95 | tmpvar_32 = _ShadowMapTexture.sample(_mtlsmp__ShadowMapTexture, (float3)(vec_30)); | |
| 96 | packDist_31 = float4(tmpvar_32); | |
| 97 | shadowVals_20.w = dot (packDist_31, float4(1.0, 0.00392157, 1.53787e-05, 6.22737e-09)); | |
| 98 | bool4 tmpvar_33; | |
| 99 | tmpvar_33 = bool4((shadowVals_20 < float4(mydist_19))); | |
| 100 | float4 tmpvar_34; | |
| 101 | tmpvar_34 = _mtl_u._LightShadowData.xxxx; | |
| 102 | float tmpvar_35; | |
| 103 | if (tmpvar_33.x) { | |
| 104 | tmpvar_35 = tmpvar_34.x; | |
| 105 | } else { | |
| 106 | tmpvar_35 = 1.0; | |
| 107 | }; | |
| 103 | 108 | float tmpvar_36; |
| 104 | if (tmpvar_34.x) { | |
| 105 | tmpvar_36 = tmpvar_35.x; | |
| 109 | if (tmpvar_33.y) { | |
| 110 | tmpvar_36 = tmpvar_34.y; | |
| 106 | 111 | } else { |
| 107 | 112 | tmpvar_36 = 1.0; |
| 108 | 113 | }; |
| 109 | 114 | float tmpvar_37; |
| 110 | if (tmpvar_34.y) { | |
| 111 | tmpvar_37 = tmpvar_35.y; | |
| 115 | if (tmpvar_33.z) { | |
| 116 | tmpvar_37 = tmpvar_34.z; | |
| 112 | 117 | } else { |
| 113 | 118 | tmpvar_37 = 1.0; |
| 114 | 119 | }; |
| 115 | 120 | float tmpvar_38; |
| 116 | if (tmpvar_34.z) { | |
| 117 | tmpvar_38 = tmpvar_35.z; | |
| 121 | if (tmpvar_33.w) { | |
| 122 | tmpvar_38 = tmpvar_34.w; | |
| 118 | 123 | } else { |
| 119 | 124 | tmpvar_38 = 1.0; |
| 120 | 125 | }; |
| 121 | float tmpvar_39; | |
| 122 | if (tmpvar_34.w) { | |
| 123 | tmpvar_39 = tmpvar_35.w; | |
| 124 | } else { | |
| 125 | tmpvar_39 = 1.0; | |
| 126 | }; | |
| 127 | float4 tmpvar_40; | |
| 128 | tmpvar_40.x = tmpvar_36; | |
| 129 | tmpvar_40.y = tmpvar_37; | |
| 130 | tmpvar_40.z = tmpvar_38; | |
| 131 | tmpvar_40.w = tmpvar_39; | |
| 132 | shadows_20 = half4(tmpvar_40); | |
| 133 | half tmpvar_41; | |
| 134 | tmpvar_41 = dot (shadows_20, (half4)float4(0.25, 0.25, 0.25, 0.25)); | |
| 135 | atten_4 = (atten_4 * (float)tmpvar_41); | |
| 136 | float4 tmpvar_42; | |
| 137 | tmpvar_42.w = 1.0; | |
| 138 | tmpvar_42.xyz = wpos_7; | |
| 139 | half4 tmpvar_43; | |
| 140 | float3 P_44; | |
| 141 | P_44 = (_mtl_u._LightMatrix0 * tmpvar_42).xyz; | |
| 142 | tmpvar_43 = _LightTexture0.sample(_mtlsmp__LightTexture0, (float3)(P_44)); | |
| 143 | atten_4 = (atten_4 * (float)tmpvar_43.w); | |
| 144 | float3 tmpvar_45; | |
| 145 | tmpvar_45 = normalize(((float3)lightDir_5 - normalize( | |
| 126 | half4 tmpvar_39; | |
| 127 | tmpvar_39.x = half(tmpvar_35); | |
| 128 | tmpvar_39.y = half(tmpvar_36); | |
| 129 | tmpvar_39.z = half(tmpvar_37); | |
| 130 | tmpvar_39.w = half(tmpvar_38); | |
| 131 | half tmpvar_40; | |
| 132 | tmpvar_40 = dot (tmpvar_39, (half4)float4(0.25, 0.25, 0.25, 0.25)); | |
| 133 | atten_4 = (atten_4 * (float)tmpvar_40); | |
| 134 | float4 tmpvar_41; | |
| 135 | tmpvar_41.w = 1.0; | |
| 136 | tmpvar_41.xyz = wpos_7; | |
| 137 | half4 tmpvar_42; | |
| 138 | float3 P_43; | |
| 139 | P_43 = (_mtl_u._LightMatrix0 * tmpvar_41).xyz; | |
| 140 | tmpvar_42 = _LightTexture0.sample(_mtlsmp__LightTexture0, (float3)(P_43)); | |
| 141 | atten_4 = (atten_4 * (float)tmpvar_42.w); | |
| 142 | float3 tmpvar_44; | |
| 143 | tmpvar_44 = normalize(((float3)lightDir_5 - normalize( | |
| 146 | 144 | (wpos_7 - _mtl_u._WorldSpaceCameraPos) |
| 147 | 145 | ))); |
| 148 | h_3 = half3(tmpvar_45); | |
| 149 | half tmpvar_46; | |
| 150 | tmpvar_46 = pow (max ((half)0.0, dot (h_3, normal_9)), (nspec_10.w * (half)128.0)); | |
| 151 | spec_2 = float(tmpvar_46); | |
| 146 | h_3 = half3(tmpvar_44); | |
| 147 | half tmpvar_45; | |
| 148 | tmpvar_45 = pow (max ((half)0.0, dot (h_3, normal_9)), (nspec_10.w * (half)128.0)); | |
| 149 | spec_2 = float(tmpvar_45); | |
| 152 | 150 | spec_2 = (spec_2 * clamp (atten_4, 0.0, 1.0)); |
| 153 | 151 | res_1.xyz = half3((_mtl_u._LightColor.xyz * ((float)max ((half)0.0, |
| 154 | 152 | dot (lightDir_5, normal_9) |
| 155 | 153 | ) * atten_4))); |
| 156 | half3 c_47; | |
| 157 | c_47 = half3(_mtl_u._LightColor.xyz); | |
| 158 | res_1.w = half((spec_2 * (float)dot (c_47, (half3)float3(0.22, 0.707, 0.071)))); | |
| 159 | float tmpvar_48; | |
| 160 | tmpvar_48 = clamp ((1.0 - ( | |
| 154 | half3 c_46; | |
| 155 | c_46 = half3(_mtl_u._LightColor.xyz); | |
| 156 | res_1.w = half((spec_2 * (float)dot (c_46, (half3)float3(0.22, 0.707, 0.071)))); | |
| 157 | float tmpvar_47; | |
| 158 | tmpvar_47 = clamp ((1.0 - ( | |
| 161 | 159 | (tmpvar_15.z * _mtl_u.unity_LightmapFade.z) |
| 162 | 160 | + _mtl_u.unity_LightmapFade.w)), 0.0, 1.0); |
| 163 | res_1 = ((half4)((float4)res_1 * tmpvar_4 | |
| 161 | res_1 = ((half4)((float4)res_1 * tmpvar_47)); | |
| 164 | 162 | _mtl_o._fragData = exp2(-(res_1)); |
| 165 | 163 | return _mtl_o; |
| 166 | 164 | } |
| r245594 | r245595 | |
|---|---|---|
| 35 | 35 | mediump float nh; |
| 36 | 36 | mediump float spec; |
| 37 | 37 | lowp vec4 c; |
| 38 | col = texture | |
| 38 | col = texture( _MainTex, i.uv); | |
| 39 | 39 | xll_clip((col.w - _Cutoff)); |
| 40 | 40 | #line 35 |
| 41 | 41 | albedo = (col.xyz * i.color); |
| 42 | specular = (texture | |
| 42 | specular = (texture( _BumpSpecMap, i.uv).x * 128.000); | |
| 43 | 43 | #line 39 |
| 44 | trngls = texture | |
| 44 | trngls = texture( _TranslucencyMap, i.uv); | |
| 45 | 45 | gloss = trngls.w; |
| 46 | 46 | light = (vec3( UNITY_LIGHTMODEL_AMBIENT) * albedo); |
| 47 | 47 | #line 44 |
| r245594 | r245595 | |
|---|---|---|
| 85 | 85 | uniform sampler2D _SelfIllum; |
| 86 | 86 | |
| 87 | 87 | vec3 Albedo( in vec4 texcoords ) { |
| 88 | vec3 albedo = (_Color.xyz * texture2D( _MainTex, texcoords.xy).xyz); | |
| 89 | albedo *= (2.0 * texture2D( _DetailAlbedoMap, texcoords.zw).xyz); | |
| 88 | vec3 albedo = (_Color.xyz * texture( _MainTex, texcoords.xy).xyz); | |
| 89 | albedo *= (2.0 * texture( _DetailAlbedoMap, texcoords.zw).xyz); | |
| 90 | 90 | return albedo; |
| 91 | 91 | } |
| 92 | 92 | float Alpha( in vec2 uv ) { |
| 93 | return (texture | |
| 93 | return (texture( _AlphaMap, uv).w * _Color.w); | |
| 94 | 94 | } |
| 95 | 95 | float BlinnPhongTerm( in float roughness, in float NdotH ) { |
| 96 | 96 | float m = (pow( roughness, 4.0) + 1e-05); |
| r245594 | r245595 | |
| 177 | 177 | return fromRGBM( envTexel); |
| 178 | 178 | } |
| 179 | 179 | float Occlusion( in vec2 uv ) { |
| 180 | return texture | |
| 180 | return texture( _Occlusion, uv).x; | |
| 181 | 181 | } |
| 182 | 182 | vec4 SpecularGloss( in vec2 uv ) { |
| 183 | vec4 specGloss = texture | |
| 183 | vec4 specGloss = texture( _SpecGlossMap, uv); | |
| 184 | 184 | return vec4( specGloss.xyz, specGloss.w); |
| 185 | 185 | } |
| 186 | 186 | vec3 BlendNormals( in vec3 n1, in vec3 n2 ) { |
| r245594 | r245595 | |
| 194 | 194 | return normal; |
| 195 | 195 | } |
| 196 | 196 | vec3 TangentNormal( in vec4 texcoords ) { |
| 197 | vec3 normalTangent = UnpackScaleNormal( texture2D( _BumpMap, texcoords.xy), _BumpScale); | |
| 198 | vec3 detailNormalTangent = UnpackScaleNormal( texture2D( _DetailNormalMap, texcoords.zw), _DetailNormalMapScale); | |
| 197 | vec3 normalTangent = UnpackScaleNormal( texture( _BumpMap, texcoords.xy), _BumpScale); | |
| 198 | vec3 detailNormalTangent = UnpackScaleNormal( texture( _DetailNormalMap, texcoords.zw), _DetailNormalMapScale); | |
| 199 | 199 | normalTangent = BlendNormals( normalTangent, detailNormalTangent); |
| 200 | 200 | return normalTangent; |
| 201 | 201 | } |
| r245594 | r245595 | |
| 204 | 204 | return xll_transpose_mf3x3(mat3( tangent, binormal, normal)); |
| 205 | 205 | } |
| 206 | 206 | float unitySampleShadow( in vec4 shadowCoord ) { |
| 207 | float shadow = texture | |
| 207 | float shadow = textureProj( _ShadowMapTexture, shadowCoord).x; | |
| 208 | 208 | return shadow; |
| 209 | 209 | } |
| 210 | 210 | vec4 frag( in VertexOutput i ) { |
| r245594 | r245595 | |
| 224 | 224 | vec3 lightDir = _WorldSpaceLightPos0.xyz; |
| 225 | 225 | float subsurface = 1.0; |
| 226 | 226 | vec3 ambient = vec3( 0.0); |
| 227 | vec4 lmtex = texture2D( unity_Lightmap, i.extra.xy); | |
| 228 | vec4 lmIndTex = texture2D( unity_LightmapInd, i.extra.xy); | |
| 227 | vec4 lmtex = texture( unity_Lightmap, i.extra.xy); | |
| 228 | vec4 lmIndTex = texture( unity_LightmapInd, i.extra.xy); | |
| 229 | 229 | vec3 lightDirTangent; |
| 230 | 230 | DecodeDirLightmap( normalTangent, lmtex, lmIndTex, lightColor, lightDirTangent); |
| 231 | 231 | lightDir = (lightDirTangent * tanToWorld); |
| 232 | 232 | lightDir = normalize(lightDir); |
| 233 | 233 | vec3 baseColor = EnergyCalculator( specColor, specular, Albedo( i.tex)); |
| 234 | 234 | vec3 color = BRDF_Disney_PBS( baseColor, (atten * lightColor), specColor, specular, roughness, normalWorld, lightDir, (-eyeVec), ambient, env); |
| 235 | color += (texture | |
| 235 | color += (texture( _SelfIllum, i.tex.xy).xyz * _SelfIllumScale); | |
| 236 | 236 | float alpha = Alpha( i.tex.xy); |
| 237 | 237 | return vec4( color, alpha); |
| 238 | 238 | } |
| r245594 | r245595 | |
|---|---|---|
| 33 | 33 | tmpvar_3 = xlv_TEXCOORD3.xyz; |
| 34 | 34 | tmpvar_4 = (((xlv_TEXCOORD2.yzx * xlv_TEXCOORD3.zxy) - (xlv_TEXCOORD2.zxy * xlv_TEXCOORD3.yzx)) * xlv_TEXCOORD3.www); |
| 35 | 35 | highp mat3 tmpvar_5; |
| 36 | tmpvar_5[0u].x = tmpvar_3.x; | |
| 37 | tmpvar_5[0u].y = tmpvar_4.x; | |
| 38 | tmpvar_5[0u].z = xlv_TEXCOORD2.x; | |
| 36 | tmpvar_5[uint(0)].x = tmpvar_3.x; | |
| 37 | tmpvar_5[uint(0)].y = tmpvar_4.x; | |
| 38 | tmpvar_5[uint(0)].z = xlv_TEXCOORD2.x; | |
| 39 | 39 | tmpvar_5[1u].x = tmpvar_3.y; |
| 40 | 40 | tmpvar_5[1u].y = tmpvar_4.y; |
| 41 | 41 | tmpvar_5[1u].z = xlv_TEXCOORD2.y; |
| r245594 | r245595 | |
| 89 | 89 | lowp vec4 tmpvar_20; |
| 90 | 90 | tmpvar_20 = texture (unity_LightmapInd, xlv_TEXCOORD4.xy); |
| 91 | 91 | highp mat3 tmpvar_21; |
| 92 | tmpvar_21[0u].x = 0.816497; | |
| 93 | tmpvar_21[0u].y = -0.408248; | |
| 94 | tmpvar_21[0u].z = -0.408248; | |
| 92 | tmpvar_21[uint(0)].x = 0.816497; | |
| 93 | tmpvar_21[uint(0)].y = -0.408248; | |
| 94 | tmpvar_21[uint(0)].z = -0.408248; | |
| 95 | 95 | tmpvar_21[1u].x = 0.0; |
| 96 | 96 | tmpvar_21[1u].y = 0.707107; |
| 97 | 97 | tmpvar_21[1u].z = -0.707107; |
| r245594 | r245595 | |
| 171 | 171 | (((1.0 - dot (tmpvar_12.xyz, vec3(0.299, 0.587, 0.114))) * (1.0 - tmpvar_14)) * pow (abs((1.0 - tmpvar_32)), 5.0)) |
| 172 | 172 | * env_2)) + (texture (_SelfIllum, xlv_TEXCOORD0.xy).xyz * _SelfIllumScale)); |
| 173 | 173 | tmpvar_38.w = (texture (_AlphaMap, xlv_TEXCOORD0.xy).w * _Color.w); |
| 174 | _fragData = tmpvar_38; | |
| 174 | mediump vec4 tmpvar_39; | |
| 175 | tmpvar_39 = tmpvar_38; | |
| 176 | _fragData = tmpvar_39; | |
| 175 | 177 | } |
| 176 | 178 | |
| 177 | 179 |
| r245594 | r245595 | |
|---|---|---|
| 149 | 149 | half VdotH_34; |
| 150 | 150 | VdotH_34 = (tmpvar_33 + (half)1e-05); |
| 151 | 151 | half tmpvar_35; |
| 152 | tmpvar_35 = ((1.0/(( | |
| 152 | tmpvar_35 = (((half)1.0/(( | |
| 153 | 153 | pow (tmpvar_14, (half)4.0) |
| 154 | 154 | + (half)1e-05))) - (half)2.0); |
| 155 | 155 | half tmpvar_36; |
| r245594 | r245595 | |
| 179 | 179 | ((((half)1.0 - dot (tmpvar_12.xyz, (half3)float3(0.299, 0.587, 0.114))) * ((half)1.0 - tmpvar_14)) * pow (abs(((half)1.0 - tmpvar_32)), (half)5.0)) |
| 180 | 180 | * env_2)) + ((half3)((float3)_SelfIllum.sample(_mtlsmp__SelfIllum, (float2)(_mtl_i.xlv_TEXCOORD0.xy)).xyz * _mtl_u._SelfIllumScale))); |
| 181 | 181 | tmpvar_38.w = ((half)((float)_AlphaMap.sample(_mtlsmp__AlphaMap, (float2)(_mtl_i.xlv_TEXCOORD0.xy)).w * _mtl_u._Color.w)); |
| 182 | _mtl_o._fragData = tmpvar_38; | |
| 182 | half4 tmpvar_39; | |
| 183 | tmpvar_39 = tmpvar_38; | |
| 184 | _mtl_o._fragData = tmpvar_39; | |
| 183 | 185 | return _mtl_o; |
| 184 | 186 | } |
| 185 | 187 |
| r245594 | r245595 | |
|---|---|---|
| 32 | 32 | } |
| 33 | 33 | void surf( in Input IN, inout SurfaceOutput o ) { |
| 34 | 34 | lowp vec4 tex; |
| 35 | tex = texture | |
| 35 | tex = texture( _MainTex, IN.uv_MainTex); | |
| 36 | 36 | o.Albedo = tex.xyz ; |
| 37 | 37 | o.Gloss = tex.w ; |
| 38 | 38 | o.Alpha = tex.w ; |
| 39 | 39 | o.Specular = _Shininess; |
| 40 | o.Normal = UnpackNormal( texture | |
| 40 | o.Normal = UnpackNormal( texture( _BumpMap, IN.uv_MainTex)); | |
| 41 | 41 | } |
| 42 | 42 | lowp vec4 LightingMobileBlinnPhong( in SurfaceOutput s, in lowp vec3 lightDir, in lowp vec3 halfDir, in lowp float atten ) { |
| 43 | 43 | lowp float diff; |
| r245594 | r245595 | |
|---|---|---|
| 32 | 32 | depth_6 = (dot (tmpvar_10.zw, vec2(1.0, 0.00392157)) * _ProjectionParams.z); |
| 33 | 33 | scale_5 = (_Params.x / depth_6); |
| 34 | 34 | occ_4 = 0.0; |
| 35 | for (int s_3 = 0; s_3 < 8; s_3++) { | |
| 35 | for (highp int s_3 = 0; s_3 < 8; s_3++) { | |
| 36 | 36 | mediump vec3 randomDir_14; |
| 37 | 37 | highp vec3 tmpvar_15; |
| 38 | 38 | highp vec3 I_16; |
| r245594 | r245595 | |
| 43 | 43 | randomDir_14 = tmpvar_15; |
| 44 | 44 | highp float tmpvar_17; |
| 45 | 45 | tmpvar_17 = dot (viewNorm_7, randomDir_14); |
| 46 | | |
| 46 | mediump float tmpvar_18; | |
| 47 | 47 | if ((tmpvar_17 < 0.0)) { |
| 48 | 48 | tmpvar_18 = 1.0; |
| 49 | 49 | } else { |
| r245594 | r245595 | |
|---|---|---|
| 52 | 52 | randomDir_14 = half3(tmpvar_15); |
| 53 | 53 | float tmpvar_17; |
| 54 | 54 | tmpvar_17 = dot (viewNorm_7, (float3)randomDir_14); |
| 55 | | |
| 55 | half tmpvar_18; | |
| 56 | 56 | if ((tmpvar_17 < 0.0)) { |
| 57 | tmpvar_18 = 1.0; | |
| 57 | tmpvar_18 = half(1.0); | |
| 58 | 58 | } else { |
| 59 | tmpvar_18 = -1.0; | |
| 59 | tmpvar_18 = half(-1.0); | |
| 60 | 60 | }; |
| 61 | randomDir_14 = (randomDir_14 * | |
| 61 | randomDir_14 = (randomDir_14 * -(tmpvar_18)); | |
| 62 | 62 | randomDir_14 = half3(((float3)randomDir_14 + (viewNorm_7 * 0.3))); |
| 63 | 63 | float4 tmpvar_19; |
| 64 | 64 | tmpvar_19 = float4(_CameraDepthNormalsTexture.sample(_mtlsmp__CameraDepthNormalsTexture, (float2)((tmpvar_2 + ((float2)randomDir_14.xy * scale_5))))); |
| r245594 | r245595 | |
|---|---|---|
| 43 | 43 | depth_8 = (dot (depthnormal_10.zw, vec2(1.0, 0.00392157)) * _ProjectionParams.z); |
| 44 | 44 | scale_7 = (_Params.x / depth_8); |
| 45 | 45 | occ_6 = 0.0; |
| 46 | for (int s_5 = 0; s_5 < 8; s_5++) { | |
| 46 | for (highp int s_5 = 0; s_5 < 8; s_5++) { | |
| 47 | 47 | highp vec4 sampleND_17; |
| 48 | 48 | mediump vec3 randomDir_18; |
| 49 | 49 | highp vec3 tmpvar_19; |
| r245594 | r245595 | |
| 55 | 55 | randomDir_18 = tmpvar_19; |
| 56 | 56 | highp float tmpvar_21; |
| 57 | 57 | tmpvar_21 = dot (viewNorm_9, randomDir_18); |
| 58 | | |
| 58 | mediump float tmpvar_22; | |
| 59 | 59 | if ((tmpvar_21 < 0.0)) { |
| 60 | 60 | tmpvar_22 = 1.0; |
| 61 | 61 | } else { |
| r0 | r245595 | |
|---|---|---|
| 1 | uniform highp float uni1; | |
| 2 | uniform mediump vec4 uni4; | |
| 3 | uniform sampler2D tex1; | |
| 4 | ||
| 5 | // global variables that aren't uniforms | |
| 6 | highp float mut_uni1; | |
| 7 | mediump vec4 mut_uni4; | |
| 8 | ||
| 9 | highp vec3 SampleDiffuse(in highp vec2 uv) | |
| 10 | { | |
| 11 | mut_uni4.xy = uv; | |
| 12 | return vec3(texture2D(tex1,mut_uni4.xy)); | |
| 13 | } | |
| 14 | lowp vec4 xlat_main(in highp vec4 uv) | |
| 15 | { | |
| 16 | lowp vec4 c = vec4(0.0); | |
| 17 | c.x += mut_uni4.x; | |
| 18 | c.xyz += SampleDiffuse(uv.xy); | |
| 19 | c.z += mut_uni1; | |
| 20 | mut_uni1 += 2.0; | |
| 21 | c.w += mut_uni1; | |
| 22 | return c; | |
| 23 | } | |
| 24 | varying highp vec4 var_uv; | |
| 25 | void main() | |
| 26 | { | |
| 27 | mut_uni1 = uni1; | |
| 28 | mut_uni4 = uni4; | |
| 29 | lowp vec4 r = xlat_main(var_uv); | |
| 30 | gl_FragData[0] = r; | |
| 31 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | ||
| 3 | uniform highp float uni1; | |
| 4 | uniform mediump vec4 uni4; | |
| 5 | uniform sampler2D tex1; | |
| 6 | uniform lowp vec4 unity_ColorSpaceDouble; | |
| 7 | uniform mediump vec3 _SkyTint; | |
| 8 | uniform mediump float _AtmosphereThickness; | |
| 9 | ||
| 10 | ||
| 11 | // global variables that aren't uniforms | |
| 12 | highp float mut_uni1; | |
| 13 | mediump vec4 mut_uni4; | |
| 14 | // global variables that are modified in complex chains of assignments/branches | |
| 15 | highp vec3 kSkyTintInGammaSpace; | |
| 16 | highp float kKrESun; | |
| 17 | highp float kKr4PI; | |
| 18 | ||
| 19 | ||
| 20 | highp vec3 SampleDiffuse(in highp vec2 uv) | |
| 21 | { | |
| 22 | mut_uni4.xy = uv; | |
| 23 | return vec3(texture(tex1, mut_uni4.xy)); | |
| 24 | } | |
| 25 | lowp vec4 xlat_main(in highp vec4 uv) | |
| 26 | { | |
| 27 | lowp vec4 c = vec4(0.0); | |
| 28 | c.x += mut_uni4.x; | |
| 29 | c.xyz += SampleDiffuse(uv.xy); | |
| 30 | c.z += mut_uni1; | |
| 31 | mut_uni1 += 2.0; | |
| 32 | c.w += mut_uni1; | |
| 33 | ||
| 34 | mediump vec3 tmpvar_1; | |
| 35 | if ((unity_ColorSpaceDouble.x > 2.0)) { | |
| 36 | tmpvar_1 = pow (_SkyTint, vec3(0.454545, 0.454545, 0.454545)); | |
| 37 | } else { | |
| 38 | tmpvar_1 = _SkyTint; | |
| 39 | }; | |
| 40 | kSkyTintInGammaSpace = tmpvar_1; | |
| 41 | highp vec3 tmpvar_2; | |
| 42 | tmpvar_2 = (1.0/(pow (mix (vec3(0.5, 0.42, 0.325), vec3(0.8, 0.72, 0.625), | |
| 43 | (vec3(1.0, 1.0, 1.0) - kSkyTintInGammaSpace) | |
| 44 | ), vec3(4.0, 4.0, 4.0)))); | |
| 45 | mediump float tmpvar_3; | |
| 46 | mediump float cse_4; | |
| 47 | cse_4 = pow (_AtmosphereThickness, 2.5); | |
| 48 | tmpvar_3 = (mix (0.0, 0.0025, cse_4) * 20.0); | |
| 49 | kKrESun = tmpvar_3; | |
| 50 | mediump float tmpvar_5; | |
| 51 | tmpvar_5 = (12.5664 * mix (0.0, 0.0025, cse_4)); | |
| 52 | kKr4PI = tmpvar_5; | |
| 53 | ||
| 54 | if (uv.x > 0.5) | |
| 55 | { | |
| 56 | c.x += pow(kKrESun, kKr4PI); | |
| 57 | } | |
| 58 | return c; | |
| 59 | } | |
| 60 | in highp vec4 var_uv; | |
| 61 | out mediump vec4 out_data; | |
| 62 | void main() | |
| 63 | { | |
| 64 | mut_uni1 = uni1; | |
| 65 | mut_uni4 = uni4; | |
| 66 | lowp vec4 r = xlat_main(var_uv); | |
| 67 | out_data = r; | |
| 68 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | uniform highp float uni1; | |
| 2 | uniform mediump vec4 uni4; | |
| 3 | uniform sampler2D tex1; | |
| 4 | highp float mut_uni1; | |
| 5 | mediump vec4 mut_uni4; | |
| 6 | varying highp vec4 var_uv; | |
| 7 | void main () | |
| 8 | { | |
| 9 | mut_uni4.zw = uni4.zw; | |
| 10 | lowp vec4 c_1; | |
| 11 | c_1.yzw = vec3(0.0, 0.0, 0.0); | |
| 12 | c_1.x = uni4.x; | |
| 13 | highp vec3 tmpvar_2; | |
| 14 | highp vec2 uv_3; | |
| 15 | uv_3 = var_uv.xy; | |
| 16 | mut_uni4.xy = uv_3; | |
| 17 | lowp vec3 tmpvar_4; | |
| 18 | tmpvar_4 = texture2D (tex1, mut_uni4.xy).xyz; | |
| 19 | tmpvar_2 = tmpvar_4; | |
| 20 | c_1.xyz = (c_1.xyz + tmpvar_2); | |
| 21 | c_1.z = (c_1.z + uni1); | |
| 22 | mut_uni1 = (uni1 + 2.0); | |
| 23 | c_1.w = mut_uni1; | |
| 24 | gl_FragData[0] = c_1; | |
| 25 | } | |
| 26 | ||
| 27 | ||
| 28 | // stats: 4 alu 1 tex 0 flow | |
| 29 | // inputs: 1 | |
| 30 | // #0: var_uv (high float) 4x1 [-1] | |
| 31 | // uniforms: 2 (total size: 0) | |
| 32 | // #0: uni1 (high float) 1x1 [-1] | |
| 33 | // #1: uni4 (medium float) 4x1 [-1] | |
| 34 | // textures: 1 | |
| 35 | // #0: tex1 (low 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | uniform highp float uni1; | |
| 3 | uniform mediump vec4 uni4; | |
| 4 | uniform sampler2D tex1; | |
| 5 | uniform mediump float _AtmosphereThickness; | |
| 6 | highp float mut_uni1; | |
| 7 | mediump vec4 mut_uni4; | |
| 8 | highp float kKrESun; | |
| 9 | highp float kKr4PI; | |
| 10 | in highp vec4 var_uv; | |
| 11 | out mediump vec4 out_data; | |
| 12 | void main () | |
| 13 | { | |
| 14 | mut_uni4.zw = uni4.zw; | |
| 15 | mediump float tmpvar_5_1; | |
| 16 | mediump float tmpvar_3_2; | |
| 17 | lowp vec4 c_3; | |
| 18 | c_3.yzw = vec3(0.0, 0.0, 0.0); | |
| 19 | c_3.x = uni4.x; | |
| 20 | highp vec3 tmpvar_4; | |
| 21 | highp vec2 uv_5; | |
| 22 | uv_5 = var_uv.xy; | |
| 23 | mut_uni4.xy = uv_5; | |
| 24 | lowp vec3 tmpvar_6; | |
| 25 | tmpvar_6 = texture (tex1, mut_uni4.xy).xyz; | |
| 26 | tmpvar_4 = tmpvar_6; | |
| 27 | c_3.xyz = (c_3.xyz + tmpvar_4); | |
| 28 | c_3.z = (c_3.z + uni1); | |
| 29 | mut_uni1 = (uni1 + 2.0); | |
| 30 | c_3.w = mut_uni1; | |
| 31 | mediump float tmpvar_7; | |
| 32 | tmpvar_7 = pow (_AtmosphereThickness, 2.5); | |
| 33 | tmpvar_3_2 = (0.05 * tmpvar_7); | |
| 34 | kKrESun = tmpvar_3_2; | |
| 35 | tmpvar_5_1 = (tmpvar_7 * 0.031416); | |
| 36 | kKr4PI = tmpvar_5_1; | |
| 37 | if ((var_uv.x > 0.5)) { | |
| 38 | highp float tmpvar_8; | |
| 39 | tmpvar_8 = pow (kKrESun, kKr4PI); | |
| 40 | c_3.x = (c_3.x + tmpvar_8); | |
| 41 | }; | |
| 42 | out_data = c_3; | |
| 43 | } | |
| 44 | ||
| 45 | ||
| 46 | // stats: 10 alu 1 tex 1 flow | |
| 47 | // inputs: 1 | |
| 48 | // #0: var_uv (high float) 4x1 [-1] | |
| 49 | // uniforms: 3 (total size: 0) | |
| 50 | // #0: uni1 (high float) 1x1 [-1] | |
| 51 | // #1: uni4 (medium float) 4x1 [-1] | |
| 52 | // #2: _AtmosphereThickness (medium float) 1x1 [-1] | |
| 53 | // textures: 1 | |
| 54 | // #0: tex1 (low 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #include <metal_stdlib> | |
| 2 | using namespace metal; | |
| 3 | struct xlatMtlShaderInput { | |
| 4 | float4 var_uv; | |
| 5 | }; | |
| 6 | struct xlatMtlShaderOutput { | |
| 7 | half4 out_data [[color(0)]]; | |
| 8 | }; | |
| 9 | struct xlatMtlShaderUniform { | |
| 10 | float uni1; | |
| 11 | half4 uni4; | |
| 12 | half _AtmosphereThickness; | |
| 13 | }; | |
| 14 | fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] | |
| 15 | , texture2d<half> tex1 [[texture(0)]], sampler _mtlsmp_tex1 [[sampler(0)]]) | |
| 16 | { | |
| 17 | xlatMtlShaderOutput _mtl_o; | |
| 18 | float mut_uni1_1; | |
| 19 | half4 mut_uni4_2; | |
| 20 | float kKrESun_3; | |
| 21 | float kKr4PI_4; | |
| 22 | mut_uni4_2.zw = _mtl_u.uni4.zw; | |
| 23 | half tmpvar_5_5; | |
| 24 | half tmpvar_3_6; | |
| 25 | half4 c_7; | |
| 26 | c_7.yzw = half3(float3(0.0, 0.0, 0.0)); | |
| 27 | c_7.x = _mtl_u.uni4.x; | |
| 28 | float3 tmpvar_8; | |
| 29 | float2 uv_9; | |
| 30 | uv_9 = _mtl_i.var_uv.xy; | |
| 31 | mut_uni4_2.xy = half2(uv_9); | |
| 32 | half3 tmpvar_10; | |
| 33 | tmpvar_10 = tex1.sample(_mtlsmp_tex1, (float2)(mut_uni4_2.xy)).xyz; | |
| 34 | tmpvar_8 = float3(tmpvar_10); | |
| 35 | c_7.xyz = half3(((float3)c_7.xyz + tmpvar_8)); | |
| 36 | c_7.z = half(((float)c_7.z + _mtl_u.uni1)); | |
| 37 | mut_uni1_1 = (_mtl_u.uni1 + 2.0); | |
| 38 | c_7.w = half(mut_uni1_1); | |
| 39 | half tmpvar_11; | |
| 40 | tmpvar_11 = pow (_mtl_u._AtmosphereThickness, (half)2.5); | |
| 41 | tmpvar_3_6 = ((half)0.05 * tmpvar_11); | |
| 42 | kKrESun_3 = float(tmpvar_3_6); | |
| 43 | tmpvar_5_5 = (tmpvar_11 * (half)0.031416); | |
| 44 | kKr4PI_4 = float(tmpvar_5_5); | |
| 45 | if ((_mtl_i.var_uv.x > 0.5)) { | |
| 46 | float tmpvar_12; | |
| 47 | tmpvar_12 = pow (kKrESun_3, kKr4PI_4); | |
| 48 | c_7.x = half(((float)c_7.x + tmpvar_12)); | |
| 49 | }; | |
| 50 | _mtl_o.out_data = c_7; | |
| 51 | return _mtl_o; | |
| 52 | } | |
| 53 | ||
| 54 | ||
| 55 | // stats: 10 alu 1 tex 1 flow | |
| 56 | // inputs: 1 | |
| 57 | // #0: var_uv (high float) 4x1 [-1] | |
| 58 | // uniforms: 3 (total size: 18) | |
| 59 | // #0: uni1 (high float) 1x1 [-1] loc 0 | |
| 60 | // #1: uni4 (medium float) 4x1 [-1] loc 8 | |
| 61 | // #2: _AtmosphereThickness (medium float) 1x1 [-1] loc 16 | |
| 62 | // textures: 1 | |
| 63 | // #0: tex1 (low 2d) 0x0 [-1] loc 0 |
| r245594 | r245595 | |
|---|---|---|
| 256 | 256 | src += "#define gl_LastFragData _glesLastFragData\n"; |
| 257 | 257 | src += "varying lowp vec4 _glesLastFragData[4];\n"; |
| 258 | 258 | } |
| 259 | src += "float shadow2DEXT (sampler2DShadow s, vec3 p) { return shadow2D(s,p).r; }\n"; | |
| 260 | src += "float shadow2DProjEXT (sampler2DShadow s, vec4 p) { return shadow2DProj(s,p).r; }\n"; | |
| 259 | if (!need3) | |
| 260 | { | |
| 261 | src += "float shadow2DEXT (sampler2DShadow s, vec3 p) { return shadow2D(s,p).r; }\n"; | |
| 262 | src += "float shadow2DProjEXT (sampler2DShadow s, vec4 p) { return shadow2DProj(s,p).r; }\n"; | |
| 263 | } | |
| 261 | 264 | } |
| 262 | 265 | src += source; |
| 263 | 266 | if (gles) |
| r245594 | r245595 | |
| 274 | 277 | replace_string (src, "precision ", "// precision ", 0); |
| 275 | 278 | replace_string (src, "#version 300 es", "", 0); |
| 276 | 279 | } |
| 277 | replace_string (src, "#extension GL_EXT_shader_framebuffer_fetch : require", "", 0); | |
| 278 | replace_string (src, "#extension GL_EXT_shader_framebuffer_fetch : enable", "", 0); | |
| 280 | ||
| 281 | // can't check FB fetch on PC | |
| 282 | if (src.find("#extension GL_EXT_shader_framebuffer_fetch") != std::string::npos) | |
| 283 | return true; | |
| 284 | ||
| 279 | 285 | if (gles && need3) |
| 280 | 286 | { |
| 281 | 287 | src = "#version 330\n" + src; |
| r245594 | r245595 | |
| 283 | 289 | const char* sourcePtr = src.c_str(); |
| 284 | 290 | |
| 285 | 291 | |
| 286 | GLhandleARB shader = glCreateShaderObjectARB (vertex ? GL_VERTEX_SHADER_ARB : GL_FRAGMENT_SHADER_ARB); | |
| 287 | glShaderSourceARB (shader, 1, &sourcePtr, NULL); | |
| 288 | glCompileShaderARB (shader); | |
| 292 | GLuint shader = glCreateShader (vertex ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER); | |
| 293 | glShaderSource (shader, 1, &sourcePtr, NULL); | |
| 294 | glCompileShader (shader); | |
| 289 | 295 | GLint status; |
| 290 | glGetObjectParameterivARB (shader, GL_OBJECT_COMPILE_STATUS_ARB, &status); | |
| 296 | ||
| 297 | glGetShaderiv (shader, GL_COMPILE_STATUS, &status); | |
| 298 | ||
| 291 | 299 | bool res = true; |
| 292 | if (status = | |
| 300 | if (status != GL_TRUE) | |
| 293 | 301 | { |
| 294 | 302 | char log[20000]; |
| 295 | 303 | log[0] = 0; |
| 296 | 304 | GLsizei logLength; |
| 297 | glGetInfoLog | |
| 305 | glGetShaderInfoLog (shader, sizeof(log), &logLength, log); | |
| 298 | 306 | printf ("\n %s: real glsl compiler error on %s:\n%s\n", testName.c_str(), prefix, log); |
| 299 | 307 | res = false; |
| 300 | 308 | } |
| 301 | glDelete | |
| 309 | glDeleteShader (shader); | |
| 302 | 310 | return res; |
| 303 | 311 | } |
| 304 | 312 | |
| r245594 | r245595 | |
| 312 | 320 | FILE* f = fopen ("metalTemp.metal", "wb"); |
| 313 | 321 | fwrite (source.c_str(), source.size(), 1, f); |
| 314 | 322 | fclose (f); |
| 315 | ||
| 323 | ||
| 324 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) | |
| 316 | 325 | int res = system("/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/bin/metal metalTemp.metal -o metalTemp.o -std=ios-metal1.0 -Wno-parentheses-equality"); |
| 317 | 326 | if (res != 0) |
| 318 | 327 | { |
| 319 | 328 | printf ("\n %s: Metal compiler failed\n", testName.c_str()); |
| 320 | 329 | return false; |
| 321 | 330 | } |
| 331 | #endif // | |
| 332 | ||
| 322 | 333 | return true; |
| 323 | 334 | } |
| 324 | 335 |
| r245594 | r245595 | |
|---|---|---|
| 54 | 54 | dir_15 = (localDir_9 / tmpvar_14); |
| 55 | 55 | highp float tmpvar_16; |
| 56 | 56 | tmpvar_16 = abs(dir_15.y); |
| 57 | vec3 tmpvar_17; | |
| 57 | highp vec3 tmpvar_17; | |
| 58 | 58 | if ((tmpvar_16 > 0.999)) { |
| 59 | 59 | tmpvar_17 = vec3(0.0, 0.0, 1.0); |
| 60 | 60 | } else { |
| r245594 | r245595 | |
|---|---|---|
| 55 | 55 | dir_15 = (localDir_9 / tmpvar_14); |
| 56 | 56 | highp float tmpvar_16; |
| 57 | 57 | tmpvar_16 = abs(dir_15.y); |
| 58 | vec3 tmpvar_17; | |
| 58 | highp vec3 tmpvar_17; | |
| 59 | 59 | if ((tmpvar_16 > 0.999)) { |
| 60 | 60 | tmpvar_17 = vec3(0.0, 0.0, 1.0); |
| 61 | 61 | } else { |
| r245594 | r245595 | |
|---|---|---|
| 13 | 13 | tmpvar_3.w = 1.0; |
| 14 | 14 | tmpvar_3.xyz = _WorldSpaceCameraPos; |
| 15 | 15 | viewDir_1 = normalize(((_World2Object * tmpvar_3).xyz - _glesVertex.xyz)); |
| 16 | mediump float | |
| 16 | mediump float tmpvar_4; | |
| 17 | 17 | highp float tmpvar_5; |
| 18 | 18 | tmpvar_5 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[0])), 0.0, 1.0); |
| 19 | | |
| 19 | tmpvar_4 = tmpvar_5; | |
| 20 | 20 | highp vec3 tmpvar_6; |
| 21 | 21 | tmpvar_6.yz = tmpvar_2.yz; |
| 22 | tmpvar_6.x = (backContrib_4 * 2.0); | |
| 23 | mediump float backContrib_7; | |
| 22 | tmpvar_6.x = (tmpvar_4 * 2.0); | |
| 23 | mediump float tmpvar_7; | |
| 24 | 24 | highp float tmpvar_8; |
| 25 | 25 | tmpvar_8 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[1])), 0.0, 1.0); |
| 26 | | |
| 26 | tmpvar_7 = tmpvar_8; | |
| 27 | 27 | highp vec3 tmpvar_9; |
| 28 | 28 | tmpvar_9.xz = tmpvar_6.xz; |
| 29 | tmpvar_9.y = (backContrib_7 * 2.0); | |
| 30 | mediump float backContrib_10; | |
| 29 | tmpvar_9.y = (tmpvar_7 * 2.0); | |
| 30 | mediump float tmpvar_10; | |
| 31 | 31 | highp float tmpvar_11; |
| 32 | 32 | tmpvar_11 = clamp (dot (viewDir_1, -(_TerrainTreeLightDirections[2])), 0.0, 1.0); |
| 33 | | |
| 33 | tmpvar_10 = tmpvar_11; | |
| 34 | 34 | highp vec3 tmpvar_12; |
| 35 | 35 | tmpvar_12.xy = tmpvar_9.xy; |
| 36 | tmpvar_12.z = ( | |
| 36 | tmpvar_12.z = (tmpvar_10 * 2.0); | |
| 37 | 37 | tmpvar_2 = tmpvar_12; |
| 38 | 38 | gl_Position = (glstate_matrix_mvp * _glesVertex); |
| 39 | 39 | xlv_TEXCOORD2 = tmpvar_12; |
| r245594 | r245595 | |
|---|---|---|
| 22 | 22 | tmpvar_3.w = 1.0; |
| 23 | 23 | tmpvar_3.xyz = _mtl_u._WorldSpaceCameraPos; |
| 24 | 24 | viewDir_1 = normalize(((_mtl_u._World2Object * tmpvar_3).xyz - _mtl_i._glesVertex.xyz)); |
| 25 | half | |
| 25 | half tmpvar_4; | |
| 26 | 26 | float tmpvar_5; |
| 27 | 27 | tmpvar_5 = clamp (dot (viewDir_1, -(_mtl_u._TerrainTreeLightDirections[0])), 0.0, 1.0); |
| 28 | | |
| 28 | tmpvar_4 = half(tmpvar_5); | |
| 29 | 29 | float3 tmpvar_6; |
| 30 | 30 | tmpvar_6.yz = tmpvar_2.yz; |
| 31 | tmpvar_6.x = float((backContrib_4 * (half)2.0)); | |
| 32 | half backContrib_7; | |
| 31 | tmpvar_6.x = float((tmpvar_4 * (half)2.0)); | |
| 32 | half tmpvar_7; | |
| 33 | 33 | float tmpvar_8; |
| 34 | 34 | tmpvar_8 = clamp (dot (viewDir_1, -(_mtl_u._TerrainTreeLightDirections[1])), 0.0, 1.0); |
| 35 | | |
| 35 | tmpvar_7 = half(tmpvar_8); | |
| 36 | 36 | float3 tmpvar_9; |
| 37 | 37 | tmpvar_9.xz = tmpvar_6.xz; |
| 38 | tmpvar_9.y = float((backContrib_7 * (half)2.0)); | |
| 39 | half backContrib_10; | |
| 38 | tmpvar_9.y = float((tmpvar_7 * (half)2.0)); | |
| 39 | half tmpvar_10; | |
| 40 | 40 | float tmpvar_11; |
| 41 | 41 | tmpvar_11 = clamp (dot (viewDir_1, -(_mtl_u._TerrainTreeLightDirections[2])), 0.0, 1.0); |
| 42 | | |
| 42 | tmpvar_10 = half(tmpvar_11); | |
| 43 | 43 | float3 tmpvar_12; |
| 44 | 44 | tmpvar_12.xy = tmpvar_9.xy; |
| 45 | tmpvar_12.z = float(( | |
| 45 | tmpvar_12.z = float((tmpvar_10 * (half)2.0)); | |
| 46 | 46 | tmpvar_2 = tmpvar_12; |
| 47 | 47 | _mtl_o.gl_Position = (_mtl_u.glstate_matrix_mvp * _mtl_i._glesVertex); |
| 48 | 48 | _mtl_o.xlv_TEXCOORD2 = tmpvar_12; |
| r245594 | r245595 | |
|---|---|---|
| 7 | 7 | out lowp vec4 xlv_TEXCOORD1; |
| 8 | 8 | void main () |
| 9 | 9 | { |
| 10 | vec4 tmpvar_1; | |
| 10 | highp vec4 tmpvar_1; | |
| 11 | 11 | tmpvar_1.xyz = normalize(_glesTANGENT.xyz); |
| 12 | 12 | tmpvar_1.w = _glesTANGENT.w; |
| 13 | 13 | lowp vec4 tmpvar_2; |
| r245594 | r245595 | |
|---|---|---|
| 16 | 16 | vertex xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) |
| 17 | 17 | { |
| 18 | 18 | xlatMtlShaderOutput _mtl_o; |
| 19 | float2 tmpvar_1; | |
| 20 | tmpvar_1 = _mtl_i._glesMultiTexCoord0.xy; | |
| 19 | half2 tmpvar_1; | |
| 20 | tmpvar_1 = half2(_mtl_i._glesMultiTexCoord0.xy); | |
| 21 | 21 | float4 tmpvar_2; |
| 22 | 22 | tmpvar_2.xyz = normalize(_mtl_i._glesTANGENT.xyz); |
| 23 | 23 | tmpvar_2.w = _mtl_i._glesTANGENT.w; |
| 24 | half2 uv_3; | |
| 25 | uv_3 = half2(tmpvar_1); | |
| 26 | half4 tmpvar_4; | |
| 27 | tmpvar_4.xy = ((half2)(_mtl_i._glesMultiTexCoord0.xy * 0.3)); | |
| 28 | tmpvar_4.xyz = half3(((float3)tmpvar_4.xyz + ((tmpvar_2.xyz * 0.5) + 0.5))); | |
| 29 | tmpvar_4.w = half(0.0); | |
| 24 | half4 tmpvar_3; | |
| 25 | tmpvar_3.xy = (tmpvar_1 * (half)0.3); | |
| 26 | tmpvar_3.xyz = half3(((float3)tmpvar_3.xyz + ((tmpvar_2.xyz * 0.5) + 0.5))); | |
| 27 | tmpvar_3.w = half(0.0); | |
| 30 | 28 | _mtl_o.gl_Position = (_mtl_u.glstate_matrix_mvp * _mtl_i._glesVertex); |
| 31 | _mtl_o.xlv_TEXCOORD0 = uv_3; | |
| 32 | _mtl_o.xlv_TEXCOORD1 = tmpvar_4; | |
| 29 | _mtl_o.xlv_TEXCOORD0 = tmpvar_1; | |
| 30 | _mtl_o.xlv_TEXCOORD1 = tmpvar_3; | |
| 33 | 31 | return _mtl_o; |
| 34 | 32 | } |
| 35 | 33 |
| r245594 | r245595 | |
|---|---|---|
| 40 | 40 | vec4 Temp_1; |
| 41 | 41 | vec4 Temp_2; |
| 42 | 42 | vec4 Temp_3; |
| 43 | int tmpvar_1; | |
| 43 | highp int tmpvar_1; | |
| 44 | 44 | void main () |
| 45 | 45 | { |
| 46 | 46 | Temp_0 = (dcl_Input0_POSITION0.yyyy * glstate_matrix_mvp[1]); |
| 47 | 47 | Temp_0 = ((glstate_matrix_mvp[0] * dcl_Input0_POSITION0.xxxx) + Temp_0); |
| 48 | 48 | Temp_0 = ((glstate_matrix_mvp[2] * dcl_Input0_POSITION0.zzzz) + Temp_0); |
| 49 | vec4 tmpvar_2; | |
| 49 | highp vec4 tmpvar_2; | |
| 50 | 50 | tmpvar_2 = ((glstate_matrix_mvp[3] * dcl_Input0_POSITION0.wwww) + Temp_0); |
| 51 | 51 | VtxGeoOutput1_TEXCOORD0.xy = ((dcl_Input2_TEXCOORD0.xyxx * _MainTex_ST.xyxx) + _MainTex_ST.zwzz).xy; |
| 52 | 52 | Temp_0.xyz = (dcl_Input0_POSITION0.yyyy * glstate_matrix_modelview0[1].xyzx).xyz; |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | ||
| 3 | // This was produced at one point from Unity's Reflect/VertexLit | |
| 4 | // shader's "Vertex Lit, emulated in shaders" pass by hlslcc. | |
| 5 | // Loop analysis was not detecting that Temp_int[0] is used as | |
| 6 | // both a loop induction variable (.w component) and for other uses | |
| 7 | // outside the loop. | |
| 8 | ||
| 9 | precision highp float; | |
| 10 | ||
| 11 | uniform vec4 unity_LightColor[8]; | |
| 12 | uniform vec4 unity_LightPosition[8]; | |
| 13 | uniform vec4 unity_LightAtten[8]; | |
| 14 | uniform vec4 unity_SpotDirection[8]; | |
| 15 | uniform mat4 glstate_matrix_mvp; | |
| 16 | uniform mat4 glstate_matrix_modelview0; | |
| 17 | uniform mat4 glstate_matrix_invtrans_modelview0; | |
| 18 | uniform mat4 _Object2World; | |
| 19 | uniform mat4 _World2Object; | |
| 20 | uniform vec4 glstate_lightmodel_ambient; | |
| 21 | uniform vec4 _MainTex_ST; | |
| 22 | uniform vec4 _Color; | |
| 23 | uniform vec4 _ReflectColor; | |
| 24 | in highp vec4 in_POSITION0; | |
| 25 | vec4 Input0; | |
| 26 | in highp vec4 in_NORMAL0; | |
| 27 | vec4 Input1; | |
| 28 | in highp vec4 in_TEXCOORD0; | |
| 29 | vec4 Input2; | |
| 30 | out highp vec4 TEXCOORD0; | |
| 31 | #define Output0 TEXCOORD0 | |
| 32 | out highp vec4 COLOR0; | |
| 33 | #define Output1 COLOR0 | |
| 34 | #undef Output2 | |
| 35 | #define Output2 phase0_Output2 | |
| 36 | vec4 phase0_Output2; | |
| 37 | vec4 Temp[4]; | |
| 38 | ivec4 Temp_int[4]; | |
| 39 | void main() | |
| 40 | { | |
| 41 | Input0 = in_POSITION0; | |
| 42 | Input1 = in_NORMAL0; | |
| 43 | Input2 = in_TEXCOORD0; | |
| 44 | Temp_int[0] = floatBitsToInt(Input0.yyyy * glstate_matrix_mvp[1]); | |
| 45 | Temp_int[0] = floatBitsToInt(glstate_matrix_mvp[0] * Input0.xxxx + intBitsToFloat(Temp_int[0])); | |
| 46 | Temp_int[0] = floatBitsToInt(glstate_matrix_mvp[2] * Input0.zzzz + intBitsToFloat(Temp_int[0])); | |
| 47 | Output2 = glstate_matrix_mvp[3] * Input0.wwww + intBitsToFloat(Temp_int[0]); | |
| 48 | Output0.xy = Input2.xy * _MainTex_ST.xy + _MainTex_ST.zw; | |
| 49 | Temp_int[0].xyz = floatBitsToInt(Input0.yyy * glstate_matrix_modelview0[1].xyz); | |
| 50 | Temp_int[0].xyz = floatBitsToInt(glstate_matrix_modelview0[0].xyz * Input0.xxx + intBitsToFloat(Temp_int[0]).xyz); | |
| 51 | Temp_int[0].xyz = floatBitsToInt(glstate_matrix_modelview0[2].xyz * Input0.zzz + intBitsToFloat(Temp_int[0]).xyz); | |
| 52 | Temp_int[0].xyz = floatBitsToInt(glstate_matrix_modelview0[3].xyz * Input0.www + intBitsToFloat(Temp_int[0]).xyz); | |
| 53 | Temp_int[1].xyz = floatBitsToInt(Input1.yyy * glstate_matrix_invtrans_modelview0[1].xyz); | |
| 54 | Temp_int[1].xyz = floatBitsToInt(glstate_matrix_invtrans_modelview0[0].xyz * Input1.xxx + intBitsToFloat(Temp_int[1]).xyz); | |
| 55 | Temp_int[1].xyz = floatBitsToInt(glstate_matrix_invtrans_modelview0[2].xyz * Input1.zzz + intBitsToFloat(Temp_int[1]).xyz); | |
| 56 | Temp_int[0].w = floatBitsToInt(dot(intBitsToFloat(Temp_int[1]).xyz, intBitsToFloat(Temp_int[1]).xyz)); | |
| 57 | Temp_int[0].w = floatBitsToInt(inversesqrt(intBitsToFloat(Temp_int[0]).w)); | |
| 58 | Temp_int[1].xyz = floatBitsToInt(intBitsToFloat(Temp_int[0]).www * intBitsToFloat(Temp_int[1]).xyz); | |
| 59 | Temp[2].xyz = glstate_lightmodel_ambient.xyz; | |
| 60 | Temp_int[0].w = 0x0; | |
| 61 | while(true){ | |
| 62 | if ((Temp_int[0].w>= 0x4)) { break; } | |
| 63 | Temp_int[1].w = int((Temp_int[0].w>=0x4) ? 0xFFFFFFFFu : 0u); | |
| 64 | Temp[3].xyz = (-intBitsToFloat(Temp_int[0]).xyz) * unity_LightPosition[Temp_int[0].w + 0].www + unity_LightPosition[Temp_int[0].w + 0].xyz; | |
| 65 | Temp_int[1].w = floatBitsToInt(dot(Temp[3].xyz, Temp[3].xyz)); | |
| 66 | Temp[2].w = inversesqrt(intBitsToFloat(Temp_int[1]).w); | |
| 67 | Temp[3].xyz = Temp[2].www * Temp[3].xyz; | |
| 68 | Temp_int[1].w = floatBitsToInt(intBitsToFloat(Temp_int[1]).w * unity_LightAtten[Temp_int[0].w + 0].z + intBitsToFloat(0x3F800000)); | |
| 69 | Temp_int[1].w = floatBitsToInt(float(intBitsToFloat(0x3F800000)) / intBitsToFloat(Temp_int[1]).w); | |
| 70 | Temp[2].w = dot(Temp[3].xyz, unity_SpotDirection[Temp_int[0].w + 0].xyz); | |
| 71 | Temp[2].w = max(Temp[2].w, intBitsToFloat(0x0)); | |
| 72 | Temp[2].w = Temp[2].w + (-unity_LightAtten[Temp_int[0].w + 0].x); | |
| 73 | Temp[2].w = Temp[2].w * unity_LightAtten[Temp_int[0].w + 0].y; | |
| 74 | Temp[2].w = clamp(Temp[2].w, 0.0, 1.0); | |
| 75 | Temp_int[1].w = floatBitsToInt(intBitsToFloat(Temp_int[1]).w * Temp[2].w); | |
| 76 | Temp[2].w = dot(intBitsToFloat(Temp_int[1]).xyz, Temp[3].xyz); | |
| 77 | Temp[2].w = max(Temp[2].w, intBitsToFloat(0x0)); | |
| 78 | Temp_int[1].w = floatBitsToInt(intBitsToFloat(Temp_int[1]).w * Temp[2].w); | |
| 79 | Temp[2].xyz = unity_LightColor[Temp_int[0].w + 0].xyz * intBitsToFloat(Temp_int[1]).www + Temp[2].xyz; | |
| 80 | Temp_int[0].w = Temp_int[0].w + 0x1; | |
| 81 | } | |
| 82 | Output1.xyz = Temp[2].xyz * _Color.xyz; | |
| 83 | Output1.w = _Color.w * _ReflectColor.w; | |
| 84 | gl_Position = vec4(phase0_Output2); | |
| 85 | return; | |
| 86 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | precision highp float; | |
| 3 | uniform vec4 unity_LightColor[8]; | |
| 4 | uniform vec4 unity_LightPosition[8]; | |
| 5 | uniform vec4 unity_LightAtten[8]; | |
| 6 | uniform vec4 unity_SpotDirection[8]; | |
| 7 | uniform mat4 glstate_matrix_mvp; | |
| 8 | uniform mat4 glstate_matrix_modelview0; | |
| 9 | uniform mat4 glstate_matrix_invtrans_modelview0; | |
| 10 | uniform vec4 glstate_lightmodel_ambient; | |
| 11 | uniform vec4 _MainTex_ST; | |
| 12 | uniform vec4 _Color; | |
| 13 | uniform vec4 _ReflectColor; | |
| 14 | in highp vec4 in_POSITION0; | |
| 15 | in highp vec4 in_NORMAL0; | |
| 16 | in highp vec4 in_TEXCOORD0; | |
| 17 | out highp vec4 TEXCOORD0; | |
| 18 | out highp vec4 COLOR0; | |
| 19 | highp vec4 phase0_Output2; | |
| 20 | highp vec4 Temp_2; | |
| 21 | highp vec4 Temp_3; | |
| 22 | highp ivec4 Temp_int_0; | |
| 23 | highp ivec4 Temp_int_1; | |
| 24 | void main () | |
| 25 | { | |
| 26 | Temp_int_0 = floatBitsToInt((in_POSITION0.yyyy * glstate_matrix_mvp[1])); | |
| 27 | Temp_int_0 = floatBitsToInt(((glstate_matrix_mvp[0] * in_POSITION0.xxxx) + intBitsToFloat(Temp_int_0))); | |
| 28 | Temp_int_0 = floatBitsToInt(((glstate_matrix_mvp[2] * in_POSITION0.zzzz) + intBitsToFloat(Temp_int_0))); | |
| 29 | phase0_Output2 = ((glstate_matrix_mvp[3] * in_POSITION0.wwww) + intBitsToFloat(Temp_int_0)); | |
| 30 | TEXCOORD0.xy = ((in_TEXCOORD0.xy * _MainTex_ST.xy) + _MainTex_ST.zw); | |
| 31 | Temp_int_0.xyz = floatBitsToInt((in_POSITION0.yyy * glstate_matrix_modelview0[1].xyz)); | |
| 32 | Temp_int_0.xyz = floatBitsToInt(((glstate_matrix_modelview0[0].xyz * in_POSITION0.xxx) + intBitsToFloat(Temp_int_0).xyz)); | |
| 33 | Temp_int_0.xyz = floatBitsToInt(((glstate_matrix_modelview0[2].xyz * in_POSITION0.zzz) + intBitsToFloat(Temp_int_0).xyz)); | |
| 34 | Temp_int_0.xyz = floatBitsToInt(((glstate_matrix_modelview0[3].xyz * in_POSITION0.www) + intBitsToFloat(Temp_int_0).xyz)); | |
| 35 | Temp_int_1.xyz = floatBitsToInt((in_NORMAL0.yyy * glstate_matrix_invtrans_modelview0[1].xyz)); | |
| 36 | Temp_int_1.xyz = floatBitsToInt(((glstate_matrix_invtrans_modelview0[0].xyz * in_NORMAL0.xxx) + intBitsToFloat(Temp_int_1).xyz)); | |
| 37 | Temp_int_1.xyz = floatBitsToInt(((glstate_matrix_invtrans_modelview0[2].xyz * in_NORMAL0.zzz) + intBitsToFloat(Temp_int_1).xyz)); | |
| 38 | Temp_int_0.w = floatBitsToInt(dot (intBitsToFloat(Temp_int_1).xyz, intBitsToFloat(Temp_int_1).xyz)); | |
| 39 | Temp_int_0.w = floatBitsToInt(inversesqrt(intBitsToFloat(Temp_int_0).w)); | |
| 40 | Temp_int_1.xyz = floatBitsToInt((intBitsToFloat(Temp_int_0).www * intBitsToFloat(Temp_int_1).xyz)); | |
| 41 | Temp_2.xyz = glstate_lightmodel_ambient.xyz; | |
| 42 | Temp_int_0.w = 0; | |
| 43 | for (; Temp_int_0.w < 4; Temp_int_0.w = (Temp_int_0.w + 1)) { | |
| 44 | Temp_3.xyz = ((-( | |
| 45 | intBitsToFloat(Temp_int_0) | |
| 46 | .xyz) * unity_LightPosition[Temp_int_0.w].www) + unity_LightPosition[Temp_int_0.w].xyz); | |
| 47 | Temp_int_1.w = floatBitsToInt(dot (Temp_3.xyz, Temp_3.xyz)); | |
| 48 | Temp_2.w = inversesqrt(intBitsToFloat(Temp_int_1).w); | |
| 49 | Temp_3.xyz = (Temp_2.www * Temp_3.xyz); | |
| 50 | Temp_int_1.w = floatBitsToInt((( | |
| 51 | intBitsToFloat(Temp_int_1) | |
| 52 | .w * unity_LightAtten[Temp_int_0.w].z) + 1.0)); | |
| 53 | Temp_int_1.w = floatBitsToInt((1.0/(intBitsToFloat(Temp_int_1).w))); | |
| 54 | Temp_2.w = dot (Temp_3.xyz, unity_SpotDirection[Temp_int_0.w].xyz); | |
| 55 | Temp_2.w = max (Temp_2.w, 0.0); | |
| 56 | Temp_2.w = (Temp_2.w - unity_LightAtten[Temp_int_0.w].x); | |
| 57 | Temp_2.w = (Temp_2.w * unity_LightAtten[Temp_int_0.w].y); | |
| 58 | Temp_2.w = clamp (Temp_2.w, 0.0, 1.0); | |
| 59 | Temp_int_1.w = floatBitsToInt((intBitsToFloat(Temp_int_1).w * Temp_2.w)); | |
| 60 | Temp_2.w = dot (intBitsToFloat(Temp_int_1).xyz, Temp_3.xyz); | |
| 61 | Temp_2.w = max (Temp_2.w, 0.0); | |
| 62 | Temp_int_1.w = floatBitsToInt((intBitsToFloat(Temp_int_1).w * Temp_2.w)); | |
| 63 | Temp_2.xyz = ((unity_LightColor[Temp_int_0.w].xyz * intBitsToFloat(Temp_int_1).www) + Temp_2.xyz); | |
| 64 | }; | |
| 65 | COLOR0.xyz = (Temp_2.xyz * _Color.xyz); | |
| 66 | COLOR0.w = (_Color.w * _ReflectColor.w); | |
| 67 | gl_Position = phase0_Output2; | |
| 68 | } | |
| 69 | ||
| 70 | ||
| 71 | // stats: 88 alu 0 tex 2 flow | |
| 72 | // inputs: 3 | |
| 73 | // #0: in_POSITION0 (high float) 4x1 [-1] | |
| 74 | // #1: in_NORMAL0 (high float) 4x1 [-1] | |
| 75 | // #2: in_TEXCOORD0 (high float) 4x1 [-1] | |
| 76 | // uniforms: 11 (total size: 0) | |
| 77 | // #0: unity_LightColor (high float) 4x1 [8] | |
| 78 | // #1: unity_LightPosition (high float) 4x1 [8] | |
| 79 | // #2: unity_LightAtten (high float) 4x1 [8] | |
| 80 | // #3: unity_SpotDirection (high float) 4x1 [8] | |
| 81 | // #4: glstate_matrix_mvp (high float) 4x4 [-1] | |
| 82 | // #5: glstate_matrix_modelview0 (high float) 4x4 [-1] | |
| 83 | // #6: glstate_matrix_invtrans_modelview0 (high float) 4x4 [-1] | |
| 84 | // #7: glstate_lightmodel_ambient (high float) 4x1 [-1] | |
| 85 | // #8: _MainTex_ST (high float) 4x1 [-1] | |
| 86 | // #9: _Color (high float) 4x1 [-1] | |
| 87 | // #10: _ReflectColor (high float) 4x1 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #include <metal_stdlib> | |
| 2 | using namespace metal; | |
| 3 | struct xlatMtlShaderInput { | |
| 4 | float4 in_POSITION0 [[attribute(0)]]; | |
| 5 | float4 in_NORMAL0 [[attribute(1)]]; | |
| 6 | float4 in_TEXCOORD0 [[attribute(2)]]; | |
| 7 | }; | |
| 8 | struct xlatMtlShaderOutput { | |
| 9 | float4 gl_Position [[position]]; | |
| 10 | float4 TEXCOORD0; | |
| 11 | float4 COLOR0; | |
| 12 | }; | |
| 13 | struct xlatMtlShaderUniform { | |
| 14 | float4 unity_LightColor[8]; | |
| 15 | float4 unity_LightPosition[8]; | |
| 16 | float4 unity_LightAtten[8]; | |
| 17 | float4 unity_SpotDirection[8]; | |
| 18 | float4x4 glstate_matrix_mvp; | |
| 19 | float4x4 glstate_matrix_modelview0; | |
| 20 | float4x4 glstate_matrix_invtrans_modelview0; | |
| 21 | float4 glstate_lightmodel_ambient; | |
| 22 | float4 _MainTex_ST; | |
| 23 | float4 _Color; | |
| 24 | float4 _ReflectColor; | |
| 25 | }; | |
| 26 | ; | |
| 27 | vertex xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]) | |
| 28 | { | |
| 29 | xlatMtlShaderOutput _mtl_o; | |
| 30 | float4 phase0_Output2_1; | |
| 31 | float4 Temp_2_2; | |
| 32 | float4 Temp_3_3; | |
| 33 | int4 Temp_int_0_4; | |
| 34 | int4 Temp_int_1_5; | |
| 35 | Temp_int_0_4 = as_type<int4>((_mtl_i.in_POSITION0.yyyy * _mtl_u.glstate_matrix_mvp[1])); | |
| 36 | Temp_int_0_4 = as_type<int4>(((_mtl_u.glstate_matrix_mvp[0] * _mtl_i.in_POSITION0.xxxx) + as_type<float4>(Temp_int_0_4))); | |
| 37 | Temp_int_0_4 = as_type<int4>(((_mtl_u.glstate_matrix_mvp[2] * _mtl_i.in_POSITION0.zzzz) + as_type<float4>(Temp_int_0_4))); | |
| 38 | phase0_Output2_1 = ((_mtl_u.glstate_matrix_mvp[3] * _mtl_i.in_POSITION0.wwww) + as_type<float4>(Temp_int_0_4)); | |
| 39 | _mtl_o.TEXCOORD0.xy = ((_mtl_i.in_TEXCOORD0.xy * _mtl_u._MainTex_ST.xy) + _mtl_u._MainTex_ST.zw); | |
| 40 | Temp_int_0_4.xyz = as_type<int3>((_mtl_i.in_POSITION0.yyy * _mtl_u.glstate_matrix_modelview0[1].xyz)); | |
| 41 | Temp_int_0_4.xyz = as_type<int3>(((_mtl_u.glstate_matrix_modelview0[0].xyz * _mtl_i.in_POSITION0.xxx) + as_type<float4>(Temp_int_0_4).xyz)); | |
| 42 | Temp_int_0_4.xyz = as_type<int3>(((_mtl_u.glstate_matrix_modelview0[2].xyz * _mtl_i.in_POSITION0.zzz) + as_type<float4>(Temp_int_0_4).xyz)); | |
| 43 | Temp_int_0_4.xyz = as_type<int3>(((_mtl_u.glstate_matrix_modelview0[3].xyz * _mtl_i.in_POSITION0.www) + as_type<float4>(Temp_int_0_4).xyz)); | |
| 44 | Temp_int_1_5.xyz = as_type<int3>((_mtl_i.in_NORMAL0.yyy * _mtl_u.glstate_matrix_invtrans_modelview0[1].xyz)); | |
| 45 | Temp_int_1_5.xyz = as_type<int3>(((_mtl_u.glstate_matrix_invtrans_modelview0[0].xyz * _mtl_i.in_NORMAL0.xxx) + as_type<float4>(Temp_int_1_5).xyz)); | |
| 46 | Temp_int_1_5.xyz = as_type<int3>(((_mtl_u.glstate_matrix_invtrans_modelview0[2].xyz * _mtl_i.in_NORMAL0.zzz) + as_type<float4>(Temp_int_1_5).xyz)); | |
| 47 | Temp_int_0_4.w = as_type<int>(dot (as_type<float4>(Temp_int_1_5).xyz, as_type<float4>(Temp_int_1_5).xyz)); | |
| 48 | Temp_int_0_4.w = as_type<int>(rsqrt(as_type<float4>(Temp_int_0_4).w)); | |
| 49 | Temp_int_1_5.xyz = as_type<int3>((as_type<float4>(Temp_int_0_4).www * as_type<float4>(Temp_int_1_5).xyz)); | |
| 50 | Temp_2_2.xyz = _mtl_u.glstate_lightmodel_ambient.xyz; | |
| 51 | Temp_int_0_4.w = 0; | |
| 52 | for (; Temp_int_0_4.w < 4; Temp_int_0_4.w = (Temp_int_0_4.w + 1)) { | |
| 53 | Temp_3_3.xyz = ((-( | |
| 54 | as_type<float4>(Temp_int_0_4) | |
| 55 | .xyz) * _mtl_u.unity_LightPosition[Temp_int_0_4.w].www) + _mtl_u.unity_LightPosition[Temp_int_0_4.w].xyz); | |
| 56 | Temp_int_1_5.w = as_type<int>(dot (Temp_3_3.xyz, Temp_3_3.xyz)); | |
| 57 | Temp_2_2.w = rsqrt(as_type<float4>(Temp_int_1_5).w); | |
| 58 | Temp_3_3.xyz = (Temp_2_2.www * Temp_3_3.xyz); | |
| 59 | Temp_int_1_5.w = as_type<int>((( | |
| 60 | as_type<float4>(Temp_int_1_5) | |
| 61 | .w * _mtl_u.unity_LightAtten[Temp_int_0_4.w].z) + 1.0)); | |
| 62 | Temp_int_1_5.w = as_type<int>((1.0/(as_type<float4>(Temp_int_1_5).w))); | |
| 63 | Temp_2_2.w = dot (Temp_3_3.xyz, _mtl_u.unity_SpotDirection[Temp_int_0_4.w].xyz); | |
| 64 | Temp_2_2.w = max (Temp_2_2.w, 0.0); | |
| 65 | Temp_2_2.w = (Temp_2_2.w - _mtl_u.unity_LightAtten[Temp_int_0_4.w].x); | |
| 66 | Temp_2_2.w = (Temp_2_2.w * _mtl_u.unity_LightAtten[Temp_int_0_4.w].y); | |
| 67 | Temp_2_2.w = clamp (Temp_2_2.w, 0.0, 1.0); | |
| 68 | Temp_int_1_5.w = as_type<int>((as_type<float4>(Temp_int_1_5).w * Temp_2_2.w)); | |
| 69 | Temp_2_2.w = dot (as_type<float4>(Temp_int_1_5).xyz, Temp_3_3.xyz); | |
| 70 | Temp_2_2.w = max (Temp_2_2.w, 0.0); | |
| 71 | Temp_int_1_5.w = as_type<int>((as_type<float4>(Temp_int_1_5).w * Temp_2_2.w)); | |
| 72 | Temp_2_2.xyz = ((_mtl_u.unity_LightColor[Temp_int_0_4.w].xyz * as_type<float4>(Temp_int_1_5).www) + Temp_2_2.xyz); | |
| 73 | }; | |
| 74 | _mtl_o.COLOR0.xyz = (Temp_2_2.xyz * _mtl_u._Color.xyz); | |
| 75 | _mtl_o.COLOR0.w = (_mtl_u._Color.w * _mtl_u._ReflectColor.w); | |
| 76 | _mtl_o.gl_Position = phase0_Output2_1; | |
| 77 | return _mtl_o; | |
| 78 | } | |
| 79 | ||
| 80 | ||
| 81 | // stats: 88 alu 0 tex 2 flow | |
| 82 | // inputs: 3 | |
| 83 | // #0: in_POSITION0 (high float) 4x1 [-1] loc 0 | |
| 84 | // #1: in_NORMAL0 (high float) 4x1 [-1] loc 1 | |
| 85 | // #2: in_TEXCOORD0 (high float) 4x1 [-1] loc 2 | |
| 86 | // uniforms: 11 (total size: 768) | |
| 87 | // #0: unity_LightColor (high float) 4x1 [8] loc 0 | |
| 88 | // #1: unity_LightPosition (high float) 4x1 [8] loc 128 | |
| 89 | // #2: unity_LightAtten (high float) 4x1 [8] loc 256 | |
| 90 | // #3: unity_SpotDirection (high float) 4x1 [8] loc 384 | |
| 91 | // #4: glstate_matrix_mvp (high float) 4x4 [-1] loc 512 | |
| 92 | // #5: glstate_matrix_modelview0 (high float) 4x4 [-1] loc 576 | |
| 93 | // #6: glstate_matrix_invtrans_modelview0 (high float) 4x4 [-1] loc 640 | |
| 94 | // #7: glstate_lightmodel_ambient (high float) 4x1 [-1] loc 704 | |
| 95 | // #8: _MainTex_ST (high float) 4x1 [-1] loc 720 | |
| 96 | // #9: _Color (high float) 4x1 [-1] loc 736 | |
| 97 | // #10: _ReflectColor (high float) 4x1 [-1] loc 752 |
| r245594 | r245595 | |
|---|---|---|
| 19 | 19 | lowp vec3 tmpvar_4; |
| 20 | 20 | lowp vec3 tmpvar_5; |
| 21 | 21 | highp mat3 tmpvar_6; |
| 22 | tmpvar_6[ | |
| 22 | tmpvar_6[uint(0)] = _Object2World[0].xyz; | |
| 23 | 23 | tmpvar_6[1u] = _Object2World[1].xyz; |
| 24 | 24 | tmpvar_6[2u] = _Object2World[2].xyz; |
| 25 | 25 | mediump vec3 tmpvar_7; |
| r245594 | r245595 | |
| 31 | 31 | tmpvar_8 = attrTangent.xyz; |
| 32 | 32 | tmpvar_9 = (((attrNormal.yzx * attrTangent.zxy) - (attrNormal.zxy * attrTangent.yzx)) * attrTangent.w); |
| 33 | 33 | mediump mat3 tmpvar_10; |
| 34 | tmpvar_10[0u].x = tmpvar_8.x; | |
| 35 | tmpvar_10[0u].y = tmpvar_9.x; | |
| 36 | tmpvar_10[0u].z = attrNormal.x; | |
| 34 | tmpvar_10[uint(0)].x = tmpvar_8.x; | |
| 35 | tmpvar_10[uint(0)].y = tmpvar_9.x; | |
| 36 | tmpvar_10[uint(0)].z = attrNormal.x; | |
| 37 | 37 | tmpvar_10[1u].x = tmpvar_8.y; |
| 38 | 38 | tmpvar_10[1u].y = tmpvar_9.y; |
| 39 | 39 | tmpvar_10[1u].z = attrNormal.y; |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | varying vec3 var_a; |
| 2 | 2 | void main () |
| 3 | 3 | { |
| 4 | gl_Position = (gl_Vertex * vec4(0.182574, 0.365148, 0.54772 | |
| 4 | gl_Position = (gl_Vertex * vec4(0.1825742, 0.3651484, 0.5477225, 0.7302967)); | |
| 5 | 5 | var_a = (gl_Vertex.xyz * normalize(vec3(0.0, 0.0, 0.0))); |
| 6 | 6 | } |
| 7 | 7 |
| r245594 | r245595 | |
|---|---|---|
| 30 | 30 | tmpvar_8.xyz = tmpvar_1; |
| 31 | 31 | viewpos_7 = (glstate_matrix_modelview0 * tmpvar_8).xyz; |
| 32 | 32 | highp mat3 tmpvar_9; |
| 33 | tmpvar_9[ | |
| 33 | tmpvar_9[uint(0)] = glstate_matrix_invtrans_modelview0[uint(0)].xyz; | |
| 34 | 34 | tmpvar_9[1u] = glstate_matrix_invtrans_modelview0[1u].xyz; |
| 35 | 35 | tmpvar_9[2u] = glstate_matrix_invtrans_modelview0[2u].xyz; |
| 36 | 36 | viewN_6 = (tmpvar_9 * n_2); |
| r0 | r245595 | |
|---|---|---|
| 1 | // stripped down version of Nicholas' Static Sky | |
| 2 | // hybrid lighting shader that exposed vector_insert_todo | |
| 3 | // bug | |
| 4 | ||
| 5 | vec4 xll_tex2Dlod(sampler2D s, vec4 coord) { | |
| 6 | return texture2DLod( s, coord.xy, coord.w); | |
| 7 | } | |
| 8 | mat3 xll_constructMat3_mf4x4( mat4 m) { | |
| 9 | return mat3( vec3( m[0]), vec3( m[1]), vec3( m[2])); | |
| 10 | } | |
| 11 | struct Lamp { | |
| 12 | vec4 posRange; | |
| 13 | vec4 colorImp; | |
| 14 | }; | |
| 15 | struct v2f { | |
| 16 | vec4 pos; | |
| 17 | vec3 diffuse; | |
| 18 | }; | |
| 19 | struct HybridAppData { | |
| 20 | vec4 vertex; | |
| 21 | vec4 tangent; | |
| 22 | vec3 normal; | |
| 23 | vec4 texcoord; | |
| 24 | vec4 bakedCol; | |
| 25 | vec2 bakedDir; | |
| 26 | }; | |
| 27 | uniform vec3 _WorldSpaceCameraPos; | |
| 28 | uniform vec4 _ProjectionParams; | |
| 29 | uniform vec4 _ScreenParams; | |
| 30 | uniform vec4 _ZBufferParams; | |
| 31 | uniform vec4 _WorldSpaceLightPos0; | |
| 32 | ||
| 33 | uniform mat4 _Object2World; | |
| 34 | uniform mat4 _World2Object; | |
| 35 | ||
| 36 | ||
| 37 | ||
| 38 | uniform float _RenderExposure; | |
| 39 | uniform vec2 _DynLampInfo_bufferSize; | |
| 40 | uniform sampler2D _DynLampInfo; | |
| 41 | uniform float LightVertOffset; | |
| 42 | uniform sampler2D LightVertTexture; | |
| 43 | uniform vec4 LightVertTextureSize; | |
| 44 | void CalcDynamicLight( in vec3 worldVert, in vec3 worldNorm, in Lamp lamp[4], inout vec3 hybridDir, inout vec3 hybridCol ) { | |
| 45 | vec4 atten; | |
| 46 | int i = 0; | |
| 47 | for ( ; (i < 4); (i++)) { | |
| 48 | ||
| 49 | vec3 lightToVert = (lamp[i].posRange.xyz - worldVert); | |
| 50 | float lengthSq = dot( lightToVert, lightToVert); | |
| 51 | vec3 lightToVertNorm = (lightToVert * inversesqrt(lengthSq)); | |
| 52 | ||
| 53 | atten[i] = (lengthSq * lamp[i].posRange.w); | |
| 54 | float nDotL = dot( lightToVertNorm, worldNorm); | |
| 55 | float weight = (atten[i] * nDotL); | |
| 56 | } | |
| 57 | ||
| 58 | int j = 0; | |
| 59 | for ( ; (j < 4); (j++)) { | |
| 60 | hybridCol += (lamp[j].colorImp.xyz * atten[j]); | |
| 61 | } | |
| 62 | } | |
| 63 | void LoadBakedLight( out vec3 hybridCol, out vec3 hybridDir ) { | |
| 64 | } | |
| 65 | vec4 DoSampleGPUBuffer( in sampler2D buffer, in vec2 coord, in vec2 dimensions ) { | |
| 66 | return xll_tex2Dlod( buffer, vec4( (coord / dimensions), 0.0, 0.0)); | |
| 67 | } | |
| 68 | void ReadLightArray3( in ivec4 lightIdx, out Lamp l0, out Lamp l1, out Lamp l2, out Lamp l3 ) { | |
| 69 | ||
| 70 | l0.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.x), 1.0), _DynLampInfo_bufferSize); | |
| 71 | l0.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.x), 2.0), _DynLampInfo_bufferSize); | |
| 72 | l1.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.y), 1.0), _DynLampInfo_bufferSize); | |
| 73 | ||
| 74 | l1.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.y), 2.0), _DynLampInfo_bufferSize); | |
| 75 | l2.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.z), 1.0), _DynLampInfo_bufferSize); | |
| 76 | l2.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.z), 2.0), _DynLampInfo_bufferSize); | |
| 77 | ||
| 78 | l3.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.w), 1.0), _DynLampInfo_bufferSize); | |
| 79 | l3.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.w), 2.0), _DynLampInfo_bufferSize); | |
| 80 | } | |
| 81 | void DoCalcHybridLight2( in vec3 worldVert, in vec3 worldNorm, out vec3 hybridCol, in vec4 bakedColor, in vec2 bakedDir ) { | |
| 82 | vec3 hybridDir; | |
| 83 | LoadBakedLight( hybridCol, hybridDir); | |
| 84 | ||
| 85 | ivec4 lightIdx = ivec4( int(worldVert.x), int(worldVert.y), int(worldVert.z), int((-worldVert.x))); | |
| 86 | Lamp l[4]; | |
| 87 | ReadLightArray3( lightIdx, l[0], l[1], l[2], l[3]); | |
| 88 | ||
| 89 | CalcDynamicLight( worldVert, worldNorm, l, hybridDir, hybridCol); | |
| 90 | } | |
| 91 | vec3 CalcDiffuseHybridLight( in vec3 worldVert, in vec3 worldNorm, in vec4 bakedColor, in vec2 bakedDir ) { | |
| 92 | vec3 hybridCol; | |
| 93 | DoCalcHybridLight2( worldVert, worldNorm, hybridCol, bakedColor, bakedDir); | |
| 94 | ||
| 95 | return hybridCol; | |
| 96 | } | |
| 97 | v2f vert( in HybridAppData v ) { | |
| 98 | v2f o; | |
| 99 | ||
| 100 | vec3 worldVert = (_Object2World * v.vertex).xyz; | |
| 101 | vec3 worldNorm = normalize((xll_constructMat3_mf4x4( _Object2World) * v.normal.xyz)); | |
| 102 | o.diffuse = CalcDiffuseHybridLight( worldVert, worldNorm, v.bakedCol, v.bakedDir); | |
| 103 | ||
| 104 | o.pos = (gl_ModelViewProjectionMatrix * v.vertex); | |
| 105 | return o; | |
| 106 | } | |
| 107 | attribute vec4 TANGENT; | |
| 108 | varying vec3 xlv_TEXCOORD2; | |
| 109 | void main() { | |
| 110 | v2f xl_retval; | |
| 111 | HybridAppData xlt_v; | |
| 112 | xlt_v.vertex = vec4(gl_Vertex); | |
| 113 | xlt_v.tangent = vec4(TANGENT); | |
| 114 | xlt_v.normal = vec3(gl_Normal); | |
| 115 | xlt_v.texcoord = vec4(gl_MultiTexCoord0); | |
| 116 | xlt_v.bakedCol = vec4(gl_Color); | |
| 117 | xlt_v.bakedDir = vec2(gl_MultiTexCoord1); | |
| 118 | xl_retval = vert( xlt_v); | |
| 119 | gl_Position = vec4(xl_retval.pos); | |
| 120 | xlv_TEXCOORD2 = vec3(xl_retval.diffuse); | |
| 121 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | // stripped down version of Nicholas' Static Sky | |
| 2 | // hybrid lighting shader that exposed vector_insert_todo | |
| 3 | // bug | |
| 4 | ||
| 5 | #define gl_Vertex _glesVertex | |
| 6 | attribute vec4 _glesVertex; | |
| 7 | #define gl_Color _glesColor | |
| 8 | attribute vec4 _glesColor; | |
| 9 | #define gl_Normal _glesNormal | |
| 10 | attribute vec3 _glesNormal; | |
| 11 | #define gl_MultiTexCoord0 _glesMultiTexCoord0 | |
| 12 | attribute vec4 _glesMultiTexCoord0; | |
| 13 | #define gl_MultiTexCoord1 _glesMultiTexCoord1 | |
| 14 | attribute vec4 _glesMultiTexCoord1; | |
| 15 | #define TANGENT _glesTANGENT | |
| 16 | attribute vec4 _glesTANGENT; | |
| 17 | vec4 xll_tex2Dlod(sampler2D s, vec4 coord) { | |
| 18 | return texture2DLod( s, coord.xy, coord.w); | |
| 19 | } | |
| 20 | mat3 xll_constructMat3_mf4x4( mat4 m) { | |
| 21 | return mat3( vec3( m[0]), vec3( m[1]), vec3( m[2])); | |
| 22 | } | |
| 23 | struct Lamp { | |
| 24 | mediump vec4 posRange; | |
| 25 | mediump vec4 colorImp; | |
| 26 | }; | |
| 27 | struct v2f { | |
| 28 | highp vec4 pos; | |
| 29 | mediump vec3 diffuse; | |
| 30 | }; | |
| 31 | struct HybridAppData { | |
| 32 | highp vec4 vertex; | |
| 33 | highp vec4 tangent; | |
| 34 | highp vec3 normal; | |
| 35 | highp vec4 texcoord; | |
| 36 | lowp vec4 bakedCol; | |
| 37 | mediump vec2 bakedDir; | |
| 38 | }; | |
| 39 | uniform highp vec4 _Time; | |
| 40 | uniform highp vec4 _SinTime; | |
| 41 | uniform highp vec4 _CosTime; | |
| 42 | uniform highp vec3 _WorldSpaceCameraPos; | |
| 43 | uniform highp vec4 _ProjectionParams; | |
| 44 | uniform highp vec4 _ScreenParams; | |
| 45 | uniform highp vec4 _ZBufferParams; | |
| 46 | uniform highp vec4 _WorldSpaceLightPos0; | |
| 47 | uniform highp vec4 _LightPositionRange; | |
| 48 | uniform highp mat4 glstate_matrix_mvp; | |
| 49 | uniform highp mat4 glstate_matrix_modelview0; | |
| 50 | uniform highp mat4 glstate_matrix_invtrans_modelview0; | |
| 51 | uniform highp mat4 _Object2World; | |
| 52 | uniform highp mat4 _World2Object; | |
| 53 | uniform highp mat4 glstate_matrix_transpose_modelview0; | |
| 54 | uniform highp mat4 glstate_matrix_projection; | |
| 55 | uniform lowp vec4 glstate_lightmodel_ambient; | |
| 56 | uniform highp float _RenderExposure; | |
| 57 | uniform mediump vec2 _DynLampInfo_bufferSize; | |
| 58 | uniform sampler2D _DynLampInfo; | |
| 59 | uniform highp float LightVertOffset; | |
| 60 | uniform sampler2D LightVertTexture; | |
| 61 | uniform highp vec4 LightVertTextureSize; | |
| 62 | void CalcDynamicLight( in highp vec3 worldVert, in highp vec3 worldNorm, in Lamp lamp[4], inout mediump vec3 hybridDir, inout mediump vec3 hybridCol ) { | |
| 63 | mediump vec4 atten; | |
| 64 | highp int i = 0; | |
| 65 | for ( ; (i < 4); (i++)) { | |
| 66 | ||
| 67 | highp vec3 lightToVert = (lamp[i].posRange.xyz - worldVert); | |
| 68 | highp float lengthSq = dot( lightToVert, lightToVert); | |
| 69 | highp vec3 lightToVertNorm = (lightToVert * inversesqrt(lengthSq)); | |
| 70 | ||
| 71 | atten[i] = (lengthSq * lamp[i].posRange.w); | |
| 72 | mediump float nDotL = dot( lightToVertNorm, worldNorm); | |
| 73 | mediump float weight = (atten[i] * nDotL); | |
| 74 | } | |
| 75 | ||
| 76 | highp int j = 0; | |
| 77 | for ( ; (j < 4); (j++)) { | |
| 78 | hybridCol += (lamp[j].colorImp.xyz * atten[j]); | |
| 79 | } | |
| 80 | } | |
| 81 | void LoadBakedLight( out mediump vec3 hybridCol, out mediump vec3 hybridDir ) { | |
| 82 | } | |
| 83 | mediump vec4 DoSampleGPUBuffer( in sampler2D buffer, in mediump vec2 coord, in mediump vec2 dimensions ) { | |
| 84 | return xll_tex2Dlod( buffer, vec4( (coord / dimensions), 0.0, 0.0)); | |
| 85 | } | |
| 86 | void ReadLightArray3( in highp ivec4 lightIdx, out Lamp l0, out Lamp l1, out Lamp l2, out Lamp l3 ) { | |
| 87 | ||
| 88 | l0.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.x), 1.0), _DynLampInfo_bufferSize); | |
| 89 | l0.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.x), 2.0), _DynLampInfo_bufferSize); | |
| 90 | l1.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.y), 1.0), _DynLampInfo_bufferSize); | |
| 91 | ||
| 92 | l1.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.y), 2.0), _DynLampInfo_bufferSize); | |
| 93 | l2.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.z), 1.0), _DynLampInfo_bufferSize); | |
| 94 | l2.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.z), 2.0), _DynLampInfo_bufferSize); | |
| 95 | ||
| 96 | l3.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.w), 1.0), _DynLampInfo_bufferSize); | |
| 97 | l3.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.w), 2.0), _DynLampInfo_bufferSize); | |
| 98 | } | |
| 99 | void DoCalcHybridLight2( in highp vec3 worldVert, in highp vec3 worldNorm, out mediump vec3 hybridCol, in lowp vec4 bakedColor, in mediump vec2 bakedDir ) { | |
| 100 | mediump vec3 hybridDir; | |
| 101 | LoadBakedLight( hybridCol, hybridDir); | |
| 102 | ||
| 103 | highp ivec4 lightIdx = ivec4( int(worldVert.x), int(worldVert.y), int(worldVert.z), int((-worldVert.x))); | |
| 104 | Lamp l[4]; | |
| 105 | ReadLightArray3( lightIdx, l[0], l[1], l[2], l[3]); | |
| 106 | ||
| 107 | CalcDynamicLight( worldVert, worldNorm, l, hybridDir, hybridCol); | |
| 108 | } | |
| 109 | highp vec3 CalcDiffuseHybridLight( in highp vec3 worldVert, in highp vec3 worldNorm, in mediump vec4 bakedColor, in mediump vec2 bakedDir ) { | |
| 110 | mediump vec3 hybridCol; | |
| 111 | DoCalcHybridLight2( worldVert, worldNorm, hybridCol, bakedColor, bakedDir); | |
| 112 | ||
| 113 | return hybridCol; | |
| 114 | } | |
| 115 | v2f vert( in HybridAppData v ) { | |
| 116 | v2f o; | |
| 117 | ||
| 118 | highp vec3 worldVert = (_Object2World * v.vertex).xyz; | |
| 119 | highp vec3 worldNorm = normalize((xll_constructMat3_mf4x4( _Object2World) * v.normal.xyz)); | |
| 120 | o.diffuse = CalcDiffuseHybridLight( worldVert, worldNorm, v.bakedCol, v.bakedDir); | |
| 121 | ||
| 122 | o.pos = (glstate_matrix_mvp * v.vertex); | |
| 123 | return o; | |
| 124 | } | |
| 125 | ||
| 126 | varying mediump vec3 xlv_TEXCOORD2; | |
| 127 | void main() { | |
| 128 | v2f xl_retval; | |
| 129 | HybridAppData xlt_v; | |
| 130 | xlt_v.vertex = vec4(gl_Vertex); | |
| 131 | xlt_v.tangent = vec4(TANGENT); | |
| 132 | xlt_v.normal = vec3(gl_Normal); | |
| 133 | xlt_v.texcoord = vec4(gl_MultiTexCoord0); | |
| 134 | xlt_v.bakedCol = vec4(gl_Color); | |
| 135 | xlt_v.bakedDir = vec2(gl_MultiTexCoord1); | |
| 136 | xl_retval = vert( xlt_v); | |
| 137 | gl_Position = vec4(xl_retval.pos); | |
| 138 | xlv_TEXCOORD2 = vec3(xl_retval.diffuse); | |
| 139 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | ||
| 3 | // stripped down version of Nicholas' Static Sky | |
| 4 | // hybrid lighting shader that exposed vector_insert_todo | |
| 5 | // bug | |
| 6 | ||
| 7 | #define gl_Vertex _glesVertex | |
| 8 | in vec4 _glesVertex; | |
| 9 | #define gl_Color _glesColor | |
| 10 | in vec4 _glesColor; | |
| 11 | #define gl_Normal _glesNormal | |
| 12 | in vec3 _glesNormal; | |
| 13 | #define gl_MultiTexCoord0 _glesMultiTexCoord0 | |
| 14 | in vec4 _glesMultiTexCoord0; | |
| 15 | #define gl_MultiTexCoord1 _glesMultiTexCoord1 | |
| 16 | in vec4 _glesMultiTexCoord1; | |
| 17 | #define TANGENT _glesTANGENT | |
| 18 | in vec4 _glesTANGENT; | |
| 19 | vec4 xll_tex2Dlod(sampler2D s, vec4 coord) { | |
| 20 | return textureLod( s, coord.xy, coord.w); | |
| 21 | } | |
| 22 | struct Lamp { | |
| 23 | mediump vec4 posRange; | |
| 24 | mediump vec4 colorImp; | |
| 25 | }; | |
| 26 | struct v2f { | |
| 27 | highp vec4 pos; | |
| 28 | mediump vec3 diffuse; | |
| 29 | }; | |
| 30 | struct HybridAppData { | |
| 31 | highp vec4 vertex; | |
| 32 | highp vec4 tangent; | |
| 33 | highp vec3 normal; | |
| 34 | highp vec4 texcoord; | |
| 35 | lowp vec4 bakedCol; | |
| 36 | mediump vec2 bakedDir; | |
| 37 | }; | |
| 38 | uniform highp vec3 _WorldSpaceCameraPos; | |
| 39 | uniform highp vec4 _ProjectionParams; | |
| 40 | uniform highp vec4 _ScreenParams; | |
| 41 | uniform highp vec4 _ZBufferParams; | |
| 42 | uniform highp vec4 _WorldSpaceLightPos0; | |
| 43 | uniform highp mat4 glstate_matrix_mvp; | |
| 44 | uniform highp mat4 glstate_matrix_modelview0; | |
| 45 | uniform highp mat4 glstate_matrix_invtrans_modelview0; | |
| 46 | uniform highp mat4 _Object2World; | |
| 47 | uniform highp mat4 _World2Object; | |
| 48 | uniform highp mat4 glstate_matrix_transpose_modelview0; | |
| 49 | uniform highp mat4 glstate_matrix_projection; | |
| 50 | uniform lowp vec4 glstate_lightmodel_ambient; | |
| 51 | uniform highp float _RenderExposure; | |
| 52 | uniform mediump vec2 _DynLampInfo_bufferSize; | |
| 53 | uniform sampler2D _DynLampInfo; | |
| 54 | uniform highp float LightVertOffset; | |
| 55 | uniform sampler2D LightVertTexture; | |
| 56 | uniform highp vec4 LightVertTextureSize; | |
| 57 | void CalcDynamicLight( in highp vec3 worldVert, in highp vec3 worldNorm, in Lamp lamp[4], inout mediump vec3 hybridDir, inout mediump vec3 hybridCol ) { | |
| 58 | mediump vec4 atten; | |
| 59 | highp int i = 0; | |
| 60 | for ( ; (i < 4); (i++)) { | |
| 61 | ||
| 62 | highp vec3 lightToVert = (lamp[i].posRange.xyz - worldVert); | |
| 63 | highp float lengthSq = dot( lightToVert, lightToVert); | |
| 64 | highp vec3 lightToVertNorm = (lightToVert * inversesqrt(lengthSq)); | |
| 65 | ||
| 66 | atten[i] = (lengthSq * lamp[i].posRange.w); | |
| 67 | mediump float nDotL = dot( lightToVertNorm, worldNorm); | |
| 68 | mediump float weight = (atten[i] * nDotL); | |
| 69 | } | |
| 70 | ||
| 71 | highp int j = 0; | |
| 72 | for ( ; (j < 4); (j++)) { | |
| 73 | hybridCol += (lamp[j].colorImp.xyz * atten[j]); | |
| 74 | } | |
| 75 | } | |
| 76 | void LoadBakedLight( out mediump vec3 hybridCol, out mediump vec3 hybridDir ) { | |
| 77 | } | |
| 78 | mediump vec4 DoSampleGPUBuffer( in sampler2D buffer, in mediump vec2 coord, in mediump vec2 dimensions ) { | |
| 79 | return xll_tex2Dlod( buffer, vec4( (coord / dimensions), 0.0, 0.0)); | |
| 80 | } | |
| 81 | void ReadLightArray3( in highp ivec4 lightIdx, out Lamp l0, out Lamp l1, out Lamp l2, out Lamp l3 ) { | |
| 82 | ||
| 83 | l0.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.x), 1.0), _DynLampInfo_bufferSize); | |
| 84 | l0.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.x), 2.0), _DynLampInfo_bufferSize); | |
| 85 | l1.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.y), 1.0), _DynLampInfo_bufferSize); | |
| 86 | ||
| 87 | l1.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.y), 2.0), _DynLampInfo_bufferSize); | |
| 88 | l2.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.z), 1.0), _DynLampInfo_bufferSize); | |
| 89 | l2.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.z), 2.0), _DynLampInfo_bufferSize); | |
| 90 | ||
| 91 | l3.posRange = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.w), 1.0), _DynLampInfo_bufferSize); | |
| 92 | l3.colorImp = DoSampleGPUBuffer( _DynLampInfo, vec2( float(lightIdx.w), 2.0), _DynLampInfo_bufferSize); | |
| 93 | } | |
| 94 | void DoCalcHybridLight2( in highp vec3 worldVert, in highp vec3 worldNorm, out mediump vec3 hybridCol, in lowp vec4 bakedColor, in mediump vec2 bakedDir ) { | |
| 95 | mediump vec3 hybridDir; | |
| 96 | LoadBakedLight( hybridCol, hybridDir); | |
| 97 | ||
| 98 | highp ivec4 lightIdx = ivec4( int(worldVert.x), int(worldVert.y), int(worldVert.z), int((-worldVert.x))); | |
| 99 | Lamp l[4]; | |
| 100 | ReadLightArray3( lightIdx, l[0], l[1], l[2], l[3]); | |
| 101 | ||
| 102 | CalcDynamicLight( worldVert, worldNorm, l, hybridDir, hybridCol); | |
| 103 | } | |
| 104 | highp vec3 CalcDiffuseHybridLight( in highp vec3 worldVert, in highp vec3 worldNorm, in mediump vec4 bakedColor, in mediump vec2 bakedDir ) { | |
| 105 | mediump vec3 hybridCol; | |
| 106 | DoCalcHybridLight2( worldVert, worldNorm, hybridCol, bakedColor, bakedDir); | |
| 107 | ||
| 108 | return hybridCol; | |
| 109 | } | |
| 110 | v2f vert( in HybridAppData v ) { | |
| 111 | v2f o; | |
| 112 | ||
| 113 | highp vec3 worldVert = (_Object2World * v.vertex).xyz; | |
| 114 | highp vec3 worldNorm = normalize((mat3( _Object2World) * v.normal.xyz)); | |
| 115 | o.diffuse = CalcDiffuseHybridLight( worldVert, worldNorm, v.bakedCol, v.bakedDir); | |
| 116 | ||
| 117 | o.pos = (glstate_matrix_mvp * v.vertex); | |
| 118 | return o; | |
| 119 | } | |
| 120 | ||
| 121 | out mediump vec3 xlv_TEXCOORD2; | |
| 122 | void main() { | |
| 123 | v2f xl_retval; | |
| 124 | HybridAppData xlt_v; | |
| 125 | xlt_v.vertex = vec4(gl_Vertex); | |
| 126 | xlt_v.tangent = vec4(TANGENT); | |
| 127 | xlt_v.normal = vec3(gl_Normal); | |
| 128 | xlt_v.texcoord = vec4(gl_MultiTexCoord0); | |
| 129 | xlt_v.bakedCol = vec4(gl_Color); | |
| 130 | xlt_v.bakedDir = vec2(gl_MultiTexCoord1); | |
| 131 | xl_retval = vert( xlt_v); | |
| 132 | gl_Position = vec4(xl_retval.pos); | |
| 133 | xlv_TEXCOORD2 = vec3(xl_retval.diffuse); | |
| 134 | } |
| r0 | r245595 | |
|---|---|---|
| 1 | uniform mat4 _Object2World; | |
| 2 | uniform vec2 _DynLampInfo_bufferSize; | |
| 3 | uniform sampler2D _DynLampInfo; | |
| 4 | varying vec3 xlv_TEXCOORD2; | |
| 5 | void main () | |
| 6 | { | |
| 7 | vec3 tmpvar_1; | |
| 8 | tmpvar_1 = (_Object2World * gl_Vertex).xyz; | |
| 9 | vec3 hybridCol_2; | |
| 10 | ivec4 tmpvar_3; | |
| 11 | tmpvar_3.xyz = ivec3(tmpvar_1); | |
| 12 | tmpvar_3.w = int(-(tmpvar_1.x)); | |
| 13 | vec4 tmpvar_4; | |
| 14 | vec4 tmpvar_5; | |
| 15 | vec4 tmpvar_6; | |
| 16 | vec4 tmpvar_7; | |
| 17 | vec2 tmpvar_8; | |
| 18 | tmpvar_8.y = 1.0; | |
| 19 | tmpvar_8.x = float(tmpvar_3.x); | |
| 20 | vec4 tmpvar_9; | |
| 21 | tmpvar_9.zw = vec2(0.0, 0.0); | |
| 22 | tmpvar_9.xy = (tmpvar_8 / _DynLampInfo_bufferSize); | |
| 23 | tmpvar_4 = texture2DLod (_DynLampInfo, tmpvar_9.xy, 0.0); | |
| 24 | vec2 tmpvar_10; | |
| 25 | tmpvar_10.y = 2.0; | |
| 26 | tmpvar_10.x = float(tmpvar_3.x); | |
| 27 | vec4 tmpvar_11; | |
| 28 | tmpvar_11.zw = vec2(0.0, 0.0); | |
| 29 | tmpvar_11.xy = (tmpvar_10 / _DynLampInfo_bufferSize); | |
| 30 | vec2 tmpvar_12; | |
| 31 | tmpvar_12.y = 1.0; | |
| 32 | tmpvar_12.x = float(tmpvar_3.y); | |
| 33 | vec4 tmpvar_13; | |
| 34 | tmpvar_13.zw = vec2(0.0, 0.0); | |
| 35 | tmpvar_13.xy = (tmpvar_12 / _DynLampInfo_bufferSize); | |
| 36 | tmpvar_5 = texture2DLod (_DynLampInfo, tmpvar_13.xy, 0.0); | |
| 37 | vec2 tmpvar_14; | |
| 38 | tmpvar_14.y = 2.0; | |
| 39 | tmpvar_14.x = float(tmpvar_3.y); | |
| 40 | vec4 tmpvar_15; | |
| 41 | tmpvar_15.zw = vec2(0.0, 0.0); | |
| 42 | tmpvar_15.xy = (tmpvar_14 / _DynLampInfo_bufferSize); | |
| 43 | vec2 tmpvar_16; | |
| 44 | tmpvar_16.y = 1.0; | |
| 45 | tmpvar_16.x = float(tmpvar_3.z); | |
| 46 | vec4 tmpvar_17; | |
| 47 | tmpvar_17.zw = vec2(0.0, 0.0); | |
| 48 | tmpvar_17.xy = (tmpvar_16 / _DynLampInfo_bufferSize); | |
| 49 | tmpvar_6 = texture2DLod (_DynLampInfo, tmpvar_17.xy, 0.0); | |
| 50 | vec2 tmpvar_18; | |
| 51 | tmpvar_18.y = 2.0; | |
| 52 | tmpvar_18.x = float(tmpvar_3.z); | |
| 53 | vec4 tmpvar_19; | |
| 54 | tmpvar_19.zw = vec2(0.0, 0.0); | |
| 55 | tmpvar_19.xy = (tmpvar_18 / _DynLampInfo_bufferSize); | |
| 56 | vec2 tmpvar_20; | |
| 57 | tmpvar_20.y = 1.0; | |
| 58 | tmpvar_20.x = float(tmpvar_3.w); | |
| 59 | vec4 tmpvar_21; | |
| 60 | tmpvar_21.zw = vec2(0.0, 0.0); | |
| 61 | tmpvar_21.xy = (tmpvar_20 / _DynLampInfo_bufferSize); | |
| 62 | tmpvar_7 = texture2DLod (_DynLampInfo, tmpvar_21.xy, 0.0); | |
| 63 | vec2 tmpvar_22; | |
| 64 | tmpvar_22.y = 2.0; | |
| 65 | tmpvar_22.x = float(tmpvar_3.w); | |
| 66 | vec4 tmpvar_23; | |
| 67 | tmpvar_23.zw = vec2(0.0, 0.0); | |
| 68 | tmpvar_23.xy = (tmpvar_22 / _DynLampInfo_bufferSize); | |
| 69 | vec3 hybridCol_24; | |
| 70 | vec4 atten_25; | |
| 71 | vec3 tmpvar_26; | |
| 72 | tmpvar_26 = (tmpvar_4.xyz - tmpvar_1); | |
| 73 | vec4 tmpvar_27; | |
| 74 | tmpvar_27.yzw = atten_25.yzw; | |
| 75 | tmpvar_27.x = (dot (tmpvar_26, tmpvar_26) * tmpvar_4.w); | |
| 76 | vec3 tmpvar_28; | |
| 77 | tmpvar_28 = (tmpvar_5.xyz - tmpvar_1); | |
| 78 | vec4 tmpvar_29; | |
| 79 | tmpvar_29.xzw = tmpvar_27.xzw; | |
| 80 | tmpvar_29.y = (dot (tmpvar_28, tmpvar_28) * tmpvar_5.w); | |
| 81 | vec3 tmpvar_30; | |
| 82 | tmpvar_30 = (tmpvar_6.xyz - tmpvar_1); | |
| 83 | vec4 tmpvar_31; | |
| 84 | tmpvar_31.xyw = tmpvar_29.xyw; | |
| 85 | tmpvar_31.z = (dot (tmpvar_30, tmpvar_30) * tmpvar_6.w); | |
| 86 | vec3 tmpvar_32; | |
| 87 | tmpvar_32 = (tmpvar_7.xyz - tmpvar_1); | |
| 88 | vec4 tmpvar_33; | |
| 89 | tmpvar_33.xyz = tmpvar_31.xyz; | |
| 90 | tmpvar_33.w = (dot (tmpvar_32, tmpvar_32) * tmpvar_7.w); | |
| 91 | atten_25 = tmpvar_33; | |
| 92 | hybridCol_24 = (hybridCol_2 + (texture2DLod (_DynLampInfo, tmpvar_11.xy, 0.0).xyz * tmpvar_27.x)); | |
| 93 | hybridCol_24 = (hybridCol_24 + (texture2DLod (_DynLampInfo, tmpvar_15.xy, 0.0).xyz * tmpvar_29.y)); | |
| 94 | hybridCol_24 = (hybridCol_24 + (texture2DLod (_DynLampInfo, tmpvar_19.xy, 0.0).xyz * tmpvar_31.z)); | |
| 95 | hybridCol_24 = (hybridCol_24 + (texture2DLod (_DynLampInfo, tmpvar_23.xy, 0.0).xyz * tmpvar_33.w)); | |
| 96 | gl_Position = (gl_ModelViewProjectionMatrix * gl_Vertex); | |
| 97 | xlv_TEXCOORD2 = hybridCol_24; | |
| 98 | } | |
| 99 | ||
| 100 | ||
| 101 | // stats: 57 alu 8 tex 0 flow | |
| 102 | // inputs: 1 | |
| 103 | // #0: gl_Vertex (high float) 4x1 [-1] loc 0 | |
| 104 | // uniforms: 3 (total size: 0) | |
| 105 | // #0: gl_ModelViewProjectionMatrix (high float) 4x4 [-1] | |
| 106 | // #1: _Object2World (high float) 4x4 [-1] | |
| 107 | // #2: _DynLampInfo_bufferSize (high float) 2x1 [-1] | |
| 108 | // textures: 1 | |
| 109 | // #0: _DynLampInfo (high 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | attribute vec4 _glesVertex; | |
| 2 | uniform highp mat4 glstate_matrix_mvp; | |
| 3 | uniform highp mat4 _Object2World; | |
| 4 | uniform mediump vec2 _DynLampInfo_bufferSize; | |
| 5 | uniform sampler2D _DynLampInfo; | |
| 6 | varying mediump vec3 xlv_TEXCOORD2; | |
| 7 | void main () | |
| 8 | { | |
| 9 | mediump vec3 tmpvar_1; | |
| 10 | highp vec3 tmpvar_2; | |
| 11 | tmpvar_2 = (_Object2World * _glesVertex).xyz; | |
| 12 | highp vec3 tmpvar_3; | |
| 13 | mediump vec3 hybridCol_4; | |
| 14 | highp ivec4 tmpvar_5; | |
| 15 | tmpvar_5.xyz = ivec3(tmpvar_2); | |
| 16 | tmpvar_5.w = int(-(tmpvar_2.x)); | |
| 17 | highp vec2 tmpvar_6; | |
| 18 | tmpvar_6.y = 1.0; | |
| 19 | tmpvar_6.x = float(tmpvar_5.x); | |
| 20 | mediump vec4 tmpvar_7; | |
| 21 | mediump vec2 coord_8; | |
| 22 | coord_8 = tmpvar_6; | |
| 23 | mediump vec4 tmpvar_9; | |
| 24 | tmpvar_9.zw = vec2(0.0, 0.0); | |
| 25 | tmpvar_9.xy = (coord_8 / _DynLampInfo_bufferSize); | |
| 26 | lowp vec4 tmpvar_10; | |
| 27 | tmpvar_10 = texture2DLod (_DynLampInfo, tmpvar_9.xy, 0.0); | |
| 28 | tmpvar_7 = tmpvar_10; | |
| 29 | highp vec2 tmpvar_11; | |
| 30 | tmpvar_11.y = 2.0; | |
| 31 | tmpvar_11.x = float(tmpvar_5.x); | |
| 32 | mediump vec4 tmpvar_12; | |
| 33 | mediump vec2 coord_13; | |
| 34 | coord_13 = tmpvar_11; | |
| 35 | mediump vec4 tmpvar_14; | |
| 36 | tmpvar_14.zw = vec2(0.0, 0.0); | |
| 37 | tmpvar_14.xy = (coord_13 / _DynLampInfo_bufferSize); | |
| 38 | lowp vec4 tmpvar_15; | |
| 39 | tmpvar_15 = texture2DLod (_DynLampInfo, tmpvar_14.xy, 0.0); | |
| 40 | tmpvar_12 = tmpvar_15; | |
| 41 | highp vec2 tmpvar_16; | |
| 42 | tmpvar_16.y = 1.0; | |
| 43 | tmpvar_16.x = float(tmpvar_5.y); | |
| 44 | mediump vec4 tmpvar_17; | |
| 45 | mediump vec2 coord_18; | |
| 46 | coord_18 = tmpvar_16; | |
| 47 | mediump vec4 tmpvar_19; | |
| 48 | tmpvar_19.zw = vec2(0.0, 0.0); | |
| 49 | tmpvar_19.xy = (coord_18 / _DynLampInfo_bufferSize); | |
| 50 | lowp vec4 tmpvar_20; | |
| 51 | tmpvar_20 = texture2DLod (_DynLampInfo, tmpvar_19.xy, 0.0); | |
| 52 | tmpvar_17 = tmpvar_20; | |
| 53 | highp vec2 tmpvar_21; | |
| 54 | tmpvar_21.y = 2.0; | |
| 55 | tmpvar_21.x = float(tmpvar_5.y); | |
| 56 | mediump vec4 tmpvar_22; | |
| 57 | mediump vec2 coord_23; | |
| 58 | coord_23 = tmpvar_21; | |
| 59 | mediump vec4 tmpvar_24; | |
| 60 | tmpvar_24.zw = vec2(0.0, 0.0); | |
| 61 | tmpvar_24.xy = (coord_23 / _DynLampInfo_bufferSize); | |
| 62 | lowp vec4 tmpvar_25; | |
| 63 | tmpvar_25 = texture2DLod (_DynLampInfo, tmpvar_24.xy, 0.0); | |
| 64 | tmpvar_22 = tmpvar_25; | |
| 65 | highp vec2 tmpvar_26; | |
| 66 | tmpvar_26.y = 1.0; | |
| 67 | tmpvar_26.x = float(tmpvar_5.z); | |
| 68 | mediump vec4 tmpvar_27; | |
| 69 | mediump vec2 coord_28; | |
| 70 | coord_28 = tmpvar_26; | |
| 71 | mediump vec4 tmpvar_29; | |
| 72 | tmpvar_29.zw = vec2(0.0, 0.0); | |
| 73 | tmpvar_29.xy = (coord_28 / _DynLampInfo_bufferSize); | |
| 74 | lowp vec4 tmpvar_30; | |
| 75 | tmpvar_30 = texture2DLod (_DynLampInfo, tmpvar_29.xy, 0.0); | |
| 76 | tmpvar_27 = tmpvar_30; | |
| 77 | highp vec2 tmpvar_31; | |
| 78 | tmpvar_31.y = 2.0; | |
| 79 | tmpvar_31.x = float(tmpvar_5.z); | |
| 80 | mediump vec4 tmpvar_32; | |
| 81 | mediump vec2 coord_33; | |
| 82 | coord_33 = tmpvar_31; | |
| 83 | mediump vec4 tmpvar_34; | |
| 84 | tmpvar_34.zw = vec2(0.0, 0.0); | |
| 85 | tmpvar_34.xy = (coord_33 / _DynLampInfo_bufferSize); | |
| 86 | lowp vec4 tmpvar_35; | |
| 87 | tmpvar_35 = texture2DLod (_DynLampInfo, tmpvar_34.xy, 0.0); | |
| 88 | tmpvar_32 = tmpvar_35; | |
| 89 | highp vec2 tmpvar_36; | |
| 90 | tmpvar_36.y = 1.0; | |
| 91 | tmpvar_36.x = float(tmpvar_5.w); | |
| 92 | mediump vec4 tmpvar_37; | |
| 93 | mediump vec2 coord_38; | |
| 94 | coord_38 = tmpvar_36; | |
| 95 | mediump vec4 tmpvar_39; | |
| 96 | tmpvar_39.zw = vec2(0.0, 0.0); | |
| 97 | tmpvar_39.xy = (coord_38 / _DynLampInfo_bufferSize); | |
| 98 | lowp vec4 tmpvar_40; | |
| 99 | tmpvar_40 = texture2DLod (_DynLampInfo, tmpvar_39.xy, 0.0); | |
| 100 | tmpvar_37 = tmpvar_40; | |
| 101 | highp vec2 tmpvar_41; | |
| 102 | tmpvar_41.y = 2.0; | |
| 103 | tmpvar_41.x = float(tmpvar_5.w); | |
| 104 | mediump vec4 tmpvar_42; | |
| 105 | mediump vec2 coord_43; | |
| 106 | coord_43 = tmpvar_41; | |
| 107 | mediump vec4 tmpvar_44; | |
| 108 | tmpvar_44.zw = vec2(0.0, 0.0); | |
| 109 | tmpvar_44.xy = (coord_43 / _DynLampInfo_bufferSize); | |
| 110 | lowp vec4 tmpvar_45; | |
| 111 | tmpvar_45 = texture2DLod (_DynLampInfo, tmpvar_44.xy, 0.0); | |
| 112 | tmpvar_42 = tmpvar_45; | |
| 113 | mediump vec3 hybridCol_46; | |
| 114 | mediump vec4 atten_47; | |
| 115 | highp vec3 tmpvar_48; | |
| 116 | tmpvar_48 = (tmpvar_7.xyz - tmpvar_2); | |
| 117 | highp float tmpvar_49; | |
| 118 | tmpvar_49 = dot (tmpvar_48, tmpvar_48); | |
| 119 | mediump vec4 tmpvar_50; | |
| 120 | tmpvar_50.yzw = atten_47.yzw; | |
| 121 | tmpvar_50.x = (tmpvar_49 * tmpvar_7.w); | |
| 122 | highp vec3 tmpvar_51; | |
| 123 | tmpvar_51 = (tmpvar_17.xyz - tmpvar_2); | |
| 124 | highp float tmpvar_52; | |
| 125 | tmpvar_52 = dot (tmpvar_51, tmpvar_51); | |
| 126 | mediump vec4 tmpvar_53; | |
| 127 | tmpvar_53.xzw = tmpvar_50.xzw; | |
| 128 | tmpvar_53.y = (tmpvar_52 * tmpvar_17.w); | |
| 129 | highp vec3 tmpvar_54; | |
| 130 | tmpvar_54 = (tmpvar_27.xyz - tmpvar_2); | |
| 131 | highp float tmpvar_55; | |
| 132 | tmpvar_55 = dot (tmpvar_54, tmpvar_54); | |
| 133 | mediump vec4 tmpvar_56; | |
| 134 | tmpvar_56.xyw = tmpvar_53.xyw; | |
| 135 | tmpvar_56.z = (tmpvar_55 * tmpvar_27.w); | |
| 136 | highp vec3 tmpvar_57; | |
| 137 | tmpvar_57 = (tmpvar_37.xyz - tmpvar_2); | |
| 138 | highp float tmpvar_58; | |
| 139 | tmpvar_58 = dot (tmpvar_57, tmpvar_57); | |
| 140 | mediump vec4 tmpvar_59; | |
| 141 | tmpvar_59.xyz = tmpvar_56.xyz; | |
| 142 | tmpvar_59.w = (tmpvar_58 * tmpvar_37.w); | |
| 143 | atten_47 = tmpvar_59; | |
| 144 | hybridCol_46 = (hybridCol_4 + (tmpvar_12.xyz * tmpvar_50.x)); | |
| 145 | hybridCol_46 = (hybridCol_46 + (tmpvar_22.xyz * tmpvar_53.y)); | |
| 146 | hybridCol_46 = (hybridCol_46 + (tmpvar_32.xyz * tmpvar_56.z)); | |
| 147 | hybridCol_46 = (hybridCol_46 + (tmpvar_42.xyz * tmpvar_59.w)); | |
| 148 | tmpvar_3 = hybridCol_46; | |
| 149 | tmpvar_1 = tmpvar_3; | |
| 150 | gl_Position = (glstate_matrix_mvp * _glesVertex); | |
| 151 | xlv_TEXCOORD2 = tmpvar_1; | |
| 152 | } | |
| 153 | ||
| 154 | ||
| 155 | // stats: 57 alu 8 tex 0 flow | |
| 156 | // inputs: 1 | |
| 157 | // #0: _glesVertex (high float) 4x1 [-1] | |
| 158 | // uniforms: 3 (total size: 0) | |
| 159 | // #0: glstate_matrix_mvp (high float) 4x4 [-1] | |
| 160 | // #1: _Object2World (high float) 4x4 [-1] | |
| 161 | // #2: _DynLampInfo_bufferSize (medium float) 2x1 [-1] | |
| 162 | // textures: 1 | |
| 163 | // #0: _DynLampInfo (low 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #version 300 es | |
| 2 | in vec4 _glesVertex; | |
| 3 | uniform highp mat4 glstate_matrix_mvp; | |
| 4 | uniform highp mat4 _Object2World; | |
| 5 | uniform mediump vec2 _DynLampInfo_bufferSize; | |
| 6 | uniform sampler2D _DynLampInfo; | |
| 7 | out mediump vec3 xlv_TEXCOORD2; | |
| 8 | void main () | |
| 9 | { | |
| 10 | mediump vec3 tmpvar_1; | |
| 11 | highp vec3 tmpvar_2; | |
| 12 | tmpvar_2 = (_Object2World * _glesVertex).xyz; | |
| 13 | highp vec3 tmpvar_3; | |
| 14 | mediump vec3 hybridCol_4; | |
| 15 | highp ivec4 tmpvar_5; | |
| 16 | tmpvar_5.xyz = ivec3(tmpvar_2); | |
| 17 | tmpvar_5.w = int(-(tmpvar_2.x)); | |
| 18 | highp vec2 tmpvar_6; | |
| 19 | tmpvar_6.y = 1.0; | |
| 20 | tmpvar_6.x = float(tmpvar_5.x); | |
| 21 | mediump vec4 tmpvar_7; | |
| 22 | mediump vec2 coord_8; | |
| 23 | coord_8 = tmpvar_6; | |
| 24 | mediump vec4 tmpvar_9; | |
| 25 | tmpvar_9.zw = vec2(0.0, 0.0); | |
| 26 | tmpvar_9.xy = (coord_8 / _DynLampInfo_bufferSize); | |
| 27 | lowp vec4 tmpvar_10; | |
| 28 | tmpvar_10 = textureLod (_DynLampInfo, tmpvar_9.xy, 0.0); | |
| 29 | tmpvar_7 = tmpvar_10; | |
| 30 | highp vec2 tmpvar_11; | |
| 31 | tmpvar_11.y = 2.0; | |
| 32 | tmpvar_11.x = float(tmpvar_5.x); | |
| 33 | mediump vec4 tmpvar_12; | |
| 34 | mediump vec2 coord_13; | |
| 35 | coord_13 = tmpvar_11; | |
| 36 | mediump vec4 tmpvar_14; | |
| 37 | tmpvar_14.zw = vec2(0.0, 0.0); | |
| 38 | tmpvar_14.xy = (coord_13 / _DynLampInfo_bufferSize); | |
| 39 | lowp vec4 tmpvar_15; | |
| 40 | tmpvar_15 = textureLod (_DynLampInfo, tmpvar_14.xy, 0.0); | |
| 41 | tmpvar_12 = tmpvar_15; | |
| 42 | highp vec2 tmpvar_16; | |
| 43 | tmpvar_16.y = 1.0; | |
| 44 | tmpvar_16.x = float(tmpvar_5.y); | |
| 45 | mediump vec4 tmpvar_17; | |
| 46 | mediump vec2 coord_18; | |
| 47 | coord_18 = tmpvar_16; | |
| 48 | mediump vec4 tmpvar_19; | |
| 49 | tmpvar_19.zw = vec2(0.0, 0.0); | |
| 50 | tmpvar_19.xy = (coord_18 / _DynLampInfo_bufferSize); | |
| 51 | lowp vec4 tmpvar_20; | |
| 52 | tmpvar_20 = textureLod (_DynLampInfo, tmpvar_19.xy, 0.0); | |
| 53 | tmpvar_17 = tmpvar_20; | |
| 54 | highp vec2 tmpvar_21; | |
| 55 | tmpvar_21.y = 2.0; | |
| 56 | tmpvar_21.x = float(tmpvar_5.y); | |
| 57 | mediump vec4 tmpvar_22; | |
| 58 | mediump vec2 coord_23; | |
| 59 | coord_23 = tmpvar_21; | |
| 60 | mediump vec4 tmpvar_24; | |
| 61 | tmpvar_24.zw = vec2(0.0, 0.0); | |
| 62 | tmpvar_24.xy = (coord_23 / _DynLampInfo_bufferSize); | |
| 63 | lowp vec4 tmpvar_25; | |
| 64 | tmpvar_25 = textureLod (_DynLampInfo, tmpvar_24.xy, 0.0); | |
| 65 | tmpvar_22 = tmpvar_25; | |
| 66 | highp vec2 tmpvar_26; | |
| 67 | tmpvar_26.y = 1.0; | |
| 68 | tmpvar_26.x = float(tmpvar_5.z); | |
| 69 | mediump vec4 tmpvar_27; | |
| 70 | mediump vec2 coord_28; | |
| 71 | coord_28 = tmpvar_26; | |
| 72 | mediump vec4 tmpvar_29; | |
| 73 | tmpvar_29.zw = vec2(0.0, 0.0); | |
| 74 | tmpvar_29.xy = (coord_28 / _DynLampInfo_bufferSize); | |
| 75 | lowp vec4 tmpvar_30; | |
| 76 | tmpvar_30 = textureLod (_DynLampInfo, tmpvar_29.xy, 0.0); | |
| 77 | tmpvar_27 = tmpvar_30; | |
| 78 | highp vec2 tmpvar_31; | |
| 79 | tmpvar_31.y = 2.0; | |
| 80 | tmpvar_31.x = float(tmpvar_5.z); | |
| 81 | mediump vec4 tmpvar_32; | |
| 82 | mediump vec2 coord_33; | |
| 83 | coord_33 = tmpvar_31; | |
| 84 | mediump vec4 tmpvar_34; | |
| 85 | tmpvar_34.zw = vec2(0.0, 0.0); | |
| 86 | tmpvar_34.xy = (coord_33 / _DynLampInfo_bufferSize); | |
| 87 | lowp vec4 tmpvar_35; | |
| 88 | tmpvar_35 = textureLod (_DynLampInfo, tmpvar_34.xy, 0.0); | |
| 89 | tmpvar_32 = tmpvar_35; | |
| 90 | highp vec2 tmpvar_36; | |
| 91 | tmpvar_36.y = 1.0; | |
| 92 | tmpvar_36.x = float(tmpvar_5.w); | |
| 93 | mediump vec4 tmpvar_37; | |
| 94 | mediump vec2 coord_38; | |
| 95 | coord_38 = tmpvar_36; | |
| 96 | mediump vec4 tmpvar_39; | |
| 97 | tmpvar_39.zw = vec2(0.0, 0.0); | |
| 98 | tmpvar_39.xy = (coord_38 / _DynLampInfo_bufferSize); | |
| 99 | lowp vec4 tmpvar_40; | |
| 100 | tmpvar_40 = textureLod (_DynLampInfo, tmpvar_39.xy, 0.0); | |
| 101 | tmpvar_37 = tmpvar_40; | |
| 102 | highp vec2 tmpvar_41; | |
| 103 | tmpvar_41.y = 2.0; | |
| 104 | tmpvar_41.x = float(tmpvar_5.w); | |
| 105 | mediump vec4 tmpvar_42; | |
| 106 | mediump vec2 coord_43; | |
| 107 | coord_43 = tmpvar_41; | |
| 108 | mediump vec4 tmpvar_44; | |
| 109 | tmpvar_44.zw = vec2(0.0, 0.0); | |
| 110 | tmpvar_44.xy = (coord_43 / _DynLampInfo_bufferSize); | |
| 111 | lowp vec4 tmpvar_45; | |
| 112 | tmpvar_45 = textureLod (_DynLampInfo, tmpvar_44.xy, 0.0); | |
| 113 | tmpvar_42 = tmpvar_45; | |
| 114 | mediump vec3 hybridCol_46; | |
| 115 | mediump vec4 atten_47; | |
| 116 | highp vec3 tmpvar_48; | |
| 117 | tmpvar_48 = (tmpvar_7.xyz - tmpvar_2); | |
| 118 | highp float tmpvar_49; | |
| 119 | tmpvar_49 = dot (tmpvar_48, tmpvar_48); | |
| 120 | mediump vec4 tmpvar_50; | |
| 121 | tmpvar_50.yzw = atten_47.yzw; | |
| 122 | tmpvar_50.x = (tmpvar_49 * tmpvar_7.w); | |
| 123 | highp vec3 tmpvar_51; | |
| 124 | tmpvar_51 = (tmpvar_17.xyz - tmpvar_2); | |
| 125 | highp float tmpvar_52; | |
| 126 | tmpvar_52 = dot (tmpvar_51, tmpvar_51); | |
| 127 | mediump vec4 tmpvar_53; | |
| 128 | tmpvar_53.xzw = tmpvar_50.xzw; | |
| 129 | tmpvar_53.y = (tmpvar_52 * tmpvar_17.w); | |
| 130 | highp vec3 tmpvar_54; | |
| 131 | tmpvar_54 = (tmpvar_27.xyz - tmpvar_2); | |
| 132 | highp float tmpvar_55; | |
| 133 | tmpvar_55 = dot (tmpvar_54, tmpvar_54); | |
| 134 | mediump vec4 tmpvar_56; | |
| 135 | tmpvar_56.xyw = tmpvar_53.xyw; | |
| 136 | tmpvar_56.z = (tmpvar_55 * tmpvar_27.w); | |
| 137 | highp vec3 tmpvar_57; | |
| 138 | tmpvar_57 = (tmpvar_37.xyz - tmpvar_2); | |
| 139 | highp float tmpvar_58; | |
| 140 | tmpvar_58 = dot (tmpvar_57, tmpvar_57); | |
| 141 | mediump vec4 tmpvar_59; | |
| 142 | tmpvar_59.xyz = tmpvar_56.xyz; | |
| 143 | tmpvar_59.w = (tmpvar_58 * tmpvar_37.w); | |
| 144 | atten_47 = tmpvar_59; | |
| 145 | hybridCol_46 = (hybridCol_4 + (tmpvar_12.xyz * tmpvar_50.x)); | |
| 146 | hybridCol_46 = (hybridCol_46 + (tmpvar_22.xyz * tmpvar_53.y)); | |
| 147 | hybridCol_46 = (hybridCol_46 + (tmpvar_32.xyz * tmpvar_56.z)); | |
| 148 | hybridCol_46 = (hybridCol_46 + (tmpvar_42.xyz * tmpvar_59.w)); | |
| 149 | tmpvar_3 = hybridCol_46; | |
| 150 | tmpvar_1 = tmpvar_3; | |
| 151 | gl_Position = (glstate_matrix_mvp * _glesVertex); | |
| 152 | xlv_TEXCOORD2 = tmpvar_1; | |
| 153 | } | |
| 154 | ||
| 155 | ||
| 156 | // stats: 57 alu 8 tex 0 flow | |
| 157 | // inputs: 1 | |
| 158 | // #0: _glesVertex (high float) 4x1 [-1] | |
| 159 | // uniforms: 3 (total size: 0) | |
| 160 | // #0: glstate_matrix_mvp (high float) 4x4 [-1] | |
| 161 | // #1: _Object2World (high float) 4x4 [-1] | |
| 162 | // #2: _DynLampInfo_bufferSize (medium float) 2x1 [-1] | |
| 163 | // textures: 1 | |
| 164 | // #0: _DynLampInfo (low 2d) 0x0 [-1] |
| r0 | r245595 | |
|---|---|---|
| 1 | #include <metal_stdlib> | |
| 2 | using namespace metal; | |
| 3 | struct xlatMtlShaderInput { | |
| 4 | float4 _glesVertex [[attribute(0)]]; | |
| 5 | }; | |
| 6 | struct xlatMtlShaderOutput { | |
| 7 | float4 gl_Position [[position]]; | |
| 8 | half3 xlv_TEXCOORD2; | |
| 9 | }; | |
| 10 | struct xlatMtlShaderUniform { | |
| 11 | float4x4 glstate_matrix_mvp; | |
| 12 | float4x4 _Object2World; | |
| 13 | half2 _DynLampInfo_bufferSize; | |
| 14 | }; | |
| 15 | vertex xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] | |
| 16 | , texture2d<half> _DynLampInfo [[texture(0)]], sampler _mtlsmp__DynLampInfo [[sampler(0)]]) | |
| 17 | { | |
| 18 | xlatMtlShaderOutput _mtl_o; | |
| 19 | half3 tmpvar_1; | |
| 20 | float3 tmpvar_2; | |
| 21 | tmpvar_2 = (_mtl_u._Object2World * _mtl_i._glesVertex).xyz; | |
| 22 | float3 tmpvar_3; | |
| 23 | half3 hybridCol_4; | |
| 24 | int4 tmpvar_5; | |
| 25 | tmpvar_5.xyz = int3(tmpvar_2); | |
| 26 | tmpvar_5.w = int(-(tmpvar_2.x)); | |
| 27 | float2 tmpvar_6; | |
| 28 | tmpvar_6.y = 1.0; | |
| 29 | tmpvar_6.x = float(tmpvar_5.x); | |
| 30 | half4 tmpvar_7; | |
| 31 | half2 coord_8; | |
| 32 | coord_8 = half2(tmpvar_6); | |
| 33 | half4 tmpvar_9; | |
| 34 | tmpvar_9.zw = half2(float2(0.0, 0.0)); | |
| 35 | tmpvar_9.xy = (coord_8 / _mtl_u._DynLampInfo_bufferSize); | |
| 36 | half4 tmpvar_10; | |
| 37 | tmpvar_10 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_9.xy), level(0.0)); | |
| 38 | tmpvar_7 = tmpvar_10; | |
| 39 | float2 tmpvar_11; | |
| 40 | tmpvar_11.y = 2.0; | |
| 41 | tmpvar_11.x = float(tmpvar_5.x); | |
| 42 | half4 tmpvar_12; | |
| 43 | half2 coord_13; | |
| 44 | coord_13 = half2(tmpvar_11); | |
| 45 | half4 tmpvar_14; | |
| 46 | tmpvar_14.zw = half2(float2(0.0, 0.0)); | |
| 47 | tmpvar_14.xy = (coord_13 / _mtl_u._DynLampInfo_bufferSize); | |
| 48 | half4 tmpvar_15; | |
| 49 | tmpvar_15 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_14.xy), level(0.0)); | |
| 50 | tmpvar_12 = tmpvar_15; | |
| 51 | float2 tmpvar_16; | |
| 52 | tmpvar_16.y = 1.0; | |
| 53 | tmpvar_16.x = float(tmpvar_5.y); | |
| 54 | half4 tmpvar_17; | |
| 55 | half2 coord_18; | |
| 56 | coord_18 = half2(tmpvar_16); | |
| 57 | half4 tmpvar_19; | |
| 58 | tmpvar_19.zw = half2(float2(0.0, 0.0)); | |
| 59 | tmpvar_19.xy = (coord_18 / _mtl_u._DynLampInfo_bufferSize); | |
| 60 | half4 tmpvar_20; | |
| 61 | tmpvar_20 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_19.xy), level(0.0)); | |
| 62 | tmpvar_17 = tmpvar_20; | |
| 63 | float2 tmpvar_21; | |
| 64 | tmpvar_21.y = 2.0; | |
| 65 | tmpvar_21.x = float(tmpvar_5.y); | |
| 66 | half4 tmpvar_22; | |
| 67 | half2 coord_23; | |
| 68 | coord_23 = half2(tmpvar_21); | |
| 69 | half4 tmpvar_24; | |
| 70 | tmpvar_24.zw = half2(float2(0.0, 0.0)); | |
| 71 | tmpvar_24.xy = (coord_23 / _mtl_u._DynLampInfo_bufferSize); | |
| 72 | half4 tmpvar_25; | |
| 73 | tmpvar_25 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_24.xy), level(0.0)); | |
| 74 | tmpvar_22 = tmpvar_25; | |
| 75 | float2 tmpvar_26; | |
| 76 | tmpvar_26.y = 1.0; | |
| 77 | tmpvar_26.x = float(tmpvar_5.z); | |
| 78 | half4 tmpvar_27; | |
| 79 | half2 coord_28; | |
| 80 | coord_28 = half2(tmpvar_26); | |
| 81 | half4 tmpvar_29; | |
| 82 | tmpvar_29.zw = half2(float2(0.0, 0.0)); | |
| 83 | tmpvar_29.xy = (coord_28 / _mtl_u._DynLampInfo_bufferSize); | |
| 84 | half4 tmpvar_30; | |
| 85 | tmpvar_30 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_29.xy), level(0.0)); | |
| 86 | tmpvar_27 = tmpvar_30; | |
| 87 | float2 tmpvar_31; | |
| 88 | tmpvar_31.y = 2.0; | |
| 89 | tmpvar_31.x = float(tmpvar_5.z); | |
| 90 | half4 tmpvar_32; | |
| 91 | half2 coord_33; | |
| 92 | coord_33 = half2(tmpvar_31); | |
| 93 | half4 tmpvar_34; | |
| 94 | tmpvar_34.zw = half2(float2(0.0, 0.0)); | |
| 95 | tmpvar_34.xy = (coord_33 / _mtl_u._DynLampInfo_bufferSize); | |
| 96 | half4 tmpvar_35; | |
| 97 | tmpvar_35 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_34.xy), level(0.0)); | |
| 98 | tmpvar_32 = tmpvar_35; | |
| 99 | float2 tmpvar_36; | |
| 100 | tmpvar_36.y = 1.0; | |
| 101 | tmpvar_36.x = float(tmpvar_5.w); | |
| 102 | half4 tmpvar_37; | |
| 103 | half2 coord_38; | |
| 104 | coord_38 = half2(tmpvar_36); | |
| 105 | half4 tmpvar_39; | |
| 106 | tmpvar_39.zw = half2(float2(0.0, 0.0)); | |
| 107 | tmpvar_39.xy = (coord_38 / _mtl_u._DynLampInfo_bufferSize); | |
| 108 | half4 tmpvar_40; | |
| 109 | tmpvar_40 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_39.xy), level(0.0)); | |
| 110 | tmpvar_37 = tmpvar_40; | |
| 111 | float2 tmpvar_41; | |
| 112 | tmpvar_41.y = 2.0; | |
| 113 | tmpvar_41.x = float(tmpvar_5.w); | |
| 114 | half4 tmpvar_42; | |
| 115 | half2 coord_43; | |
| 116 | coord_43 = half2(tmpvar_41); | |
| 117 | half4 tmpvar_44; | |
| 118 | tmpvar_44.zw = half2(float2(0.0, 0.0)); | |
| 119 | tmpvar_44.xy = (coord_43 / _mtl_u._DynLampInfo_bufferSize); | |
| 120 | half4 tmpvar_45; | |
| 121 | tmpvar_45 = _DynLampInfo.sample(_mtlsmp__DynLampInfo, (float2)(tmpvar_44.xy), level(0.0)); | |
| 122 | tmpvar_42 = tmpvar_45; | |
| 123 | half3 hybridCol_46; | |
| 124 | half4 atten_47; | |
| 125 | float3 tmpvar_48; | |
| 126 | tmpvar_48 = ((float3)tmpvar_7.xyz - tmpvar_2); | |
| 127 | float tmpvar_49; | |
| 128 | tmpvar_49 = dot (tmpvar_48, tmpvar_48); | |
| 129 | half4 tmpvar_50; | |
| 130 | tmpvar_50.yzw = atten_47.yzw; | |
| 131 | tmpvar_50.x = half((tmpvar_49 * (float)tmpvar_7.w)); | |
| 132 | float3 tmpvar_51; | |
| 133 | tmpvar_51 = ((float3)tmpvar_17.xyz - tmpvar_2); | |
| 134 | float tmpvar_52; | |
| 135 | tmpvar_52 = dot (tmpvar_51, tmpvar_51); | |
| 136 | half4 tmpvar_53; | |
| 137 | tmpvar_53.xzw = tmpvar_50.xzw; | |
| 138 | tmpvar_53.y = half((tmpvar_52 * (float)tmpvar_17.w)); | |
| 139 | float3 tmpvar_54; | |
| 140 | tmpvar_54 = ((float3)tmpvar_27.xyz - tmpvar_2); | |
| 141 | float tmpvar_55; | |
| 142 | tmpvar_55 = dot (tmpvar_54, tmpvar_54); | |
| 143 | half4 tmpvar_56; | |
| 144 | tmpvar_56.xyw = tmpvar_53.xyw; | |
| 145 | tmpvar_56.z = half((tmpvar_55 * (float)tmpvar_27.w)); | |
| 146 | float3 tmpvar_57; | |
| 147 | tmpvar_57 = ((float3)tmpvar_37.xyz - tmpvar_2); | |
| 148 | float tmpvar_58; | |
| 149 | tmpvar_58 = dot (tmpvar_57, tmpvar_57); | |
| 150 | half4 tmpvar_59; | |
| 151 | tmpvar_59.xyz = tmpvar_56.xyz; | |
| 152 | tmpvar_59.w = half((tmpvar_58 * (float)tmpvar_37.w)); | |
| 153 | atten_47 = tmpvar_59; | |
| 154 | hybridCol_46 = (hybridCol_4 + (tmpvar_12.xyz * tmpvar_50.x)); | |
| 155 | hybridCol_46 = (hybridCol_46 + (tmpvar_22.xyz * tmpvar_53.y)); | |
| 156 | hybridCol_46 = (hybridCol_46 + (tmpvar_32.xyz * tmpvar_56.z)); | |
| 157 | hybridCol_46 = (hybridCol_46 + (tmpvar_42.xyz * tmpvar_59.w)); | |
| 158 | tmpvar_3 = float3(hybridCol_46); | |
| 159 | tmpvar_1 = half3(tmpvar_3); | |
| 160 | _mtl_o.gl_Position = (_mtl_u.glstate_matrix_mvp * _mtl_i._glesVertex); | |
| 161 | _mtl_o.xlv_TEXCOORD2 = tmpvar_1; | |
| 162 | return _mtl_o; | |
| 163 | } | |
| 164 | ||
| 165 | ||
| 166 | // stats: 57 alu 8 tex 0 flow | |
| 167 | // inputs: 1 | |
| 168 | // #0: _glesVertex (high float) 4x1 [-1] loc 0 | |
| 169 | // uniforms: 3 (total size: 132) | |
| 170 | // #0: glstate_matrix_mvp (high float) 4x4 [-1] loc 0 | |
| 171 | // #1: _Object2World (high float) 4x4 [-1] loc 64 | |
| 172 | // #2: _DynLampInfo_bufferSize (medium float) 2x1 [-1] loc 128 | |
| 173 | // textures: 1 | |
| 174 | // #0: _DynLampInfo (low 2d) 0x0 [-1] loc 0 |
| r245594 | r245595 | |
|---|---|---|
| 103 | 103 | tmpvar_6.xyz = normalize(tmpvar_14.xyz); |
| 104 | 104 | binormal_4 = (((tmpvar_26.yzx * tmpvar_6.zxy) - (tmpvar_26.zxy * tmpvar_6.yzx)) * tmpvar_14.w); |
| 105 | 105 | highp mat3 tmpvar_27; |
| 106 | tmpvar_27[0u].x = tmpvar_6.x; | |
| 107 | tmpvar_27[0u].y = binormal_4.x; | |
| 108 | tmpvar_27[0u].z = tmpvar_26.x; | |
| 106 | tmpvar_27[uint(0)].x = tmpvar_6.x; | |
| 107 | tmpvar_27[uint(0)].y = binormal_4.x; | |
| 108 | tmpvar_27[uint(0)].z = tmpvar_26.x; | |
| 109 | 109 | tmpvar_27[1u].x = tmpvar_6.y; |
| 110 | 110 | tmpvar_27[1u].y = binormal_4.y; |
| 111 | 111 | tmpvar_27[1u].z = tmpvar_26.y; |
| r245594 | r245595 | |
|---|---|---|
| 68 | 68 | ) + (r2_16 * 0.0083333)) + ((r2_16 * r5_18) * -0.00019841)); |
| 69 | 69 | s_11 = (s_15 * s_15); |
| 70 | 70 | s_11 = (s_11 * s_11); |
| 71 | lighting_10 = (dot (s_11, vec4(0.674 | |
| 71 | lighting_10 = (dot (s_11, vec4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7); | |
| 72 | 72 | s_11 = (s_11 * TANGENT.y); |
| 73 | 73 | waveMove_9.x = dot (s_11, vec4(0.024, 0.04, -0.12, 0.096)); |
| 74 | 74 | waveMove_9.z = dot (s_11, vec4(0.006, 0.02, -0.02, 0.1)); |
| r245594 | r245595 | |
|---|---|---|
| 53 | 53 | ) + (r2_14 * 0.0083333)) + ((r2_14 * r5_16) * -0.00019841)); |
| 54 | 54 | s_9 = (s_13 * s_13); |
| 55 | 55 | s_9 = (s_9 * s_9); |
| 56 | lighting_8 = (dot (s_9, vec4(0.674 | |
| 56 | lighting_8 = (dot (s_9, vec4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7); | |
| 57 | 57 | s_9 = (s_9 * TANGENT.y); |
| 58 | 58 | waveMove_7.x = dot (s_9, vec4(0.024, 0.04, -0.12, 0.096)); |
| 59 | 59 | waveMove_7.z = dot (s_9, vec4(0.006, 0.02, -0.02, 0.1)); |
| r245594 | r245595 | |
|---|---|---|
| 51 | 51 | ) + (r2_16 * 0.0083333)) + ((r2_16 * r5_18) * -0.00019841)); |
| 52 | 52 | s_11 = (s_15 * s_15); |
| 53 | 53 | s_11 = (s_11 * s_11); |
| 54 | lighting_10 = (dot (s_11, vec4(0.674 | |
| 54 | lighting_10 = (dot (s_11, vec4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7); | |
| 55 | 55 | s_11 = (s_11 * TANGENT.y); |
| 56 | 56 | waveMove_9.x = dot (s_11, vec4(0.024, 0.04, -0.12, 0.096)); |
| 57 | 57 | waveMove_9.z = dot (s_11, vec4(0.006, 0.02, -0.02, 0.1)); |
| r245594 | r245595 | |
|---|---|---|
| 36 | 36 | ) + (r2_10 * 0.0083333)) + ((r2_10 * r5_12) * -0.00019841)); |
| 37 | 37 | s_5 = (s_9 * s_9); |
| 38 | 38 | s_5 = (s_5 * s_5); |
| 39 | lighting_4 = (dot (s_5, vec4(0.674 | |
| 39 | lighting_4 = (dot (s_5, vec4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7); | |
| 40 | 40 | s_5 = (s_5 * (gl_Color.w * _WaveAndDistance.z)); |
| 41 | 41 | waveMove_3.x = dot (s_5, vec4(0.024, 0.04, -0.12, 0.096)); |
| 42 | 42 | waveMove_3.z = dot (s_5, vec4(0.006, 0.02, -0.02, 0.1)); |
| r245594 | r245595 | |
|---|---|---|
| 465 | 465 | #ifndef GL_VERSION_1_5 |
| 466 | 466 | #define GL_VERSION_1_5 1 |
| 467 | 467 | #include <stddef.h> |
| 468 | #if | |
| 468 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1090) | |
| 469 | 469 | typedef long GLsizeiptr; |
| 470 | 470 | typedef long GLintptr; |
| 471 | 471 | #else |
| r245594 | r245595 | |
| 4135 | 4135 | |
| 4136 | 4136 | #ifndef GL_ARB_vertex_buffer_object |
| 4137 | 4137 | #define GL_ARB_vertex_buffer_object 1 |
| 4138 | #if | |
| 4138 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1090) | |
| 4139 | 4139 | typedef long GLsizeiptrARB; |
| 4140 | 4140 | typedef long GLintptrARB; |
| 4141 | 4141 | #else |
| r245594 | r245595 | |
|---|---|---|
| 44 | 44 | typedef int ImGuiWindowFlags; // enum ImGuiWindowFlags_ |
| 45 | 45 | typedef int ImGuiSetCond; // enum ImGuiSetCondition_ |
| 46 | 46 | typedef int ImGuiInputTextFlags; // enum ImGuiInputTextFlags_ |
| 47 | struct ImGuiTextEditCallbackData; // for advanced uses of InputText() | |
| 47 | struct ImGuiTextEditCallbackData; // for advanced uses of InputText() | |
| 48 | 48 | typedef int (*ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data); |
| 49 | 49 | |
| 50 | 50 | struct ImVec2 |
| r245594 | r245595 | |
| 76 | 76 | IMGUI_API void MemFree(void* ptr); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | // std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug). | |
| 79 | // std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug). | |
| 80 | 80 | // Use '#define ImVector std::vector' if you want to use the STL type or your own type. |
| 81 | 81 | // Our implementation does NOT call c++ constructors! because the data types we use don't need them (but that could be added as well). Only provide the minimum functionalities we need. |
| 82 | 82 | #ifndef ImVector |
| r245594 | r245595 | |
| 117 | 117 | inline void swap(ImVector<T>& rhs) { const size_t rhs_size = rhs.Size; rhs.Size = Size; Size = rhs_size; const size_t rhs_cap = rhs.Capacity; rhs.Capacity = Capacity; Capacity = rhs_cap; value_type* rhs_data = rhs.Data; rhs.Data = Data; Data = rhs_data; } |
| 118 | 118 | |
| 119 | 119 | inline void resize(size_t new_size) { if (new_size > Capacity) reserve(new_size); Size = new_size; } |
| 120 | inline void reserve(size_t new_capacity) | |
| 121 | { | |
| 120 | inline void reserve(size_t new_capacity) | |
| 121 | { | |
| 122 | 122 | if (new_capacity <= Capacity) return; |
| 123 | 123 | T* new_data = (value_type*)ImGui::MemAlloc(new_capacity * sizeof(value_type)); |
| 124 | 124 | memcpy(new_data, Data, Size * sizeof(value_type)); |
| 125 | 125 | ImGui::MemFree(Data); |
| 126 | 126 | Data = new_data; |
| 127 | Capacity = new_capacity; | |
| 127 | Capacity = new_capacity; | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | inline void push_back(const value_type& v) { if (Size == Capacity) reserve(Capacity ? Capacity * 2 : 4); Data[Size++] = v; } |
| r245594 | r245595 | |
| 262 | 262 | IMGUI_API void TextWrapped(const char* fmt, ...); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos(); |
| 263 | 263 | IMGUI_API void TextWrappedV(const char* fmt, va_list args); |
| 264 | 264 | IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // doesn't require null terminated string if 'text_end' is specified. no copy done to any bounded stack buffer, recommended for long chunks of text. |
| 265 | IMGUI_API void LabelText(const char* label, const char* fmt, ...); // display text+label aligned the same way as value+label widgets | |
| 265 | IMGUI_API void LabelText(const char* label, const char* fmt, ...); // display text+label aligned the same way as value+label widgets | |
| 266 | 266 | IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args); |
| 267 | 267 | IMGUI_API void Bullet(); |
| 268 | 268 | IMGUI_API void BulletText(const char* fmt, ...); |
| r245594 | r245595 | |
| 343 | 343 | // Utilities |
| 344 | 344 | IMGUI_API bool IsItemHovered(); // was the last item hovered by mouse? |
| 345 | 345 | IMGUI_API bool IsItemActive(); // was the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false) |
| 346 | IMGUI_API bool IsAnyItemActive(); // | |
| 346 | IMGUI_API bool IsAnyItemActive(); // | |
| 347 | 347 | IMGUI_API ImVec2 GetItemBoxMin(); // get bounding box of last item |
| 348 | 348 | IMGUI_API ImVec2 GetItemBoxMax(); // get bounding box of last item |
| 349 | 349 | IMGUI_API bool IsClipped(const ImVec2& item_size); // to perform coarse clipping on user's side (as an optimization) |
| r245594 | r245595 | |
| 569 | 569 | // User Functions |
| 570 | 570 | //------------------------------------------------------------------ |
| 571 | 571 | |
| 572 | // REQUIRED: rendering function. | |
| 572 | // REQUIRED: rendering function. | |
| 573 | 573 | // See example code if you are unsure of how to implement this. |
| 574 | void (*RenderDrawListsFn)(ImDrawList** const draw_lists, int count); | |
| 574 | void (*RenderDrawListsFn)(ImDrawList** const draw_lists, int count); | |
| 575 | 575 | |
| 576 | 576 | // Optional: access OS clipboard |
| 577 | 577 | // (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) |
| r245594 | r245595 | |
| 594 | 594 | |
| 595 | 595 | ImVec2 MousePos; // Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.) |
| 596 | 596 | bool MouseDown[5]; // Mouse buttons. ImGui itself only uses button 0 (left button). Others buttons allows to track if mouse is being used by your application + available to user as a convenience via IsMouse** API. |
| 597 | float MouseWheel; // Mouse wheel: 1 unit scrolls about 5 lines text. | |
| 597 | float MouseWheel; // Mouse wheel: 1 unit scrolls about 5 lines text. | |
| 598 | 598 | bool MouseDrawCursor; // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). |
| 599 | 599 | bool KeyCtrl; // Keyboard modifier pressed: Control |
| 600 | 600 | bool KeyShift; // Keyboard modifier pressed: Shift |
| r245594 | r245595 | |
| 706 | 706 | // - You want to store custom debug data easily without adding or editing structures in your code. |
| 707 | 707 | struct ImGuiStorage |
| 708 | 708 | { |
| 709 | struct Pair | |
| 710 | { | |
| 711 | ImGuiID key; | |
| 712 | union { int val_i; float val_f; void* val_p; }; | |
| 713 | Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; } | |
| 714 | Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; } | |
| 715 | Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; } | |
| 709 | struct Pair | |
| 710 | { | |
| 711 | ImGuiID key; | |
| 712 | union { int val_i; float val_f; void* val_p; }; | |
| 713 | Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; } | |
| 714 | Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; } | |
| 715 | Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; } | |
| 716 | 716 | }; |
| 717 | 717 | ImVector<Pair> Data; |
| 718 | 718 | |
| r245594 | r245595 | |
| 727 | 727 | IMGUI_API void* GetVoidPtr(ImGuiID key) const; // default_val is NULL |
| 728 | 728 | IMGUI_API void SetVoidPtr(ImGuiID key, void* val); |
| 729 | 729 | |
| 730 | // - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. | |
| 730 | // - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. | |
| 731 | 731 | // - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. |
| 732 | 732 | // - A typical use case where this is convenient: |
| 733 | 733 | // float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; |
| r245594 | r245595 | |
| 833 | 833 | |
| 834 | 834 | // [Internal to ImGui] |
| 835 | 835 | ImVector<ImVec4> clip_rect_stack; // [Internal] |
| 836 | ImVector<ImTextureID> texture_id_stack; // [Internal] | |
| 836 | ImVector<ImTextureID> texture_id_stack; // [Internal] | |
| 837 | 837 | ImDrawVert* vtx_write; // [Internal] point within vtx_buffer after each add command (to avoid using the ImVector<> operators too much) |
| 838 | 838 | |
| 839 | 839 | ImDrawList() { Clear(); } |
| r245594 | r245595 | |
| 843 | 843 | IMGUI_API void PushTextureID(const ImTextureID& texture_id); |
| 844 | 844 | IMGUI_API void PopTextureID(); |
| 845 | 845 | |
| 846 | // Primitives | |
| 846 | // Primitives | |
| 847 | 847 | IMGUI_API void AddLine(const ImVec2& a, const ImVec2& b, ImU32 col); |
| 848 | 848 | IMGUI_API void AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners=0x0F); |
| 849 | 849 | IMGUI_API void AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners=0x0F); |
| r245594 | r245595 | |
|---|---|---|
| 309 | 309 | |
| 310 | 310 |  |
| 311 | 311 | |
| 312 | ### [25-c99](https://github.com/bkaradzic/bgfx/tree/master/examples/25-c99) | |
| 313 | ||
| 314 | Initialization and debug text with C99 API. | |
| 315 | ||
| 312 | 316 | Dependencies |
| 313 | 317 | ------------ |
| 314 | 318 |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_metaballs_glsl[39 | |
| 1 | static const uint8_t fs_metaballs_glsl[398] = | |
| 2 | 2 | { |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0x7 | |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0x7f, 0x01, 0x00, 0x00, 0x76, 0x61, // FSH..,.?......va | |
| 4 | 4 | 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 |
| 5 | 5 | 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi |
| 6 | 6 | 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ |
| r245594 | r245595 | |
| 10 | 10 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x74, 0x20, // tmpvar_1 = dot |
| 11 | 11 | 0x28, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x76, 0x5f, 0x6e, 0x6f, 0x72, // (normalize(v_nor |
| 12 | 12 | 0x6d, 0x61, 0x6c, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, // mal), vec3(0.0, |
| 13 | 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, // 0.0, -1.0));. h | |
| 14 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ighp vec4 tmpvar | |
| 15 | 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, // _2;. tmpvar_2.w | |
| 16 | 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // = 1.0;. tmpvar | |
| 17 | 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x28, 0x28, // _2.xyz = pow ((( | |
| 18 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . pow (v_colo | |
| 19 | 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x32, 0x2e, 0x32, // r0.xyz, vec3(2.2 | |
| 20 | 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, // , 2.2, 2.2)). | |
| 21 | 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x20, 0x2b, 0x20, 0x70, 0x6f, // * tmpvar_1) + po | |
| 22 | 0x77, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2c, 0x20, 0x33, 0x30, 0x2e, // w (tmpvar_1, 30. | |
| 23 | 0x30, 0x29, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, // 0)), vec3(0.4545 | |
| 24 | 0x34, 0x35, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x2c, 0x20, 0x30, 0x2e, // 45, 0.454545, 0. | |
| 25 | 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // 454545));. gl_F | |
| 26 | 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva | |
| 27 | 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_2;.}... | |
| 13 | 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6d, // 0.0, -1.0));. m | |
| 14 | 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // ediump vec4 tmpv | |
| 15 | 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // ar_2;. tmpvar_2 | |
| 16 | 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // .w = 1.0;. tmpv | |
| 17 | 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, // ar_2.xyz = pow ( | |
| 18 | 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, // ((. pow (v_co | |
| 19 | 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x32, // lor0.xyz, vec3(2 | |
| 20 | 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x0a, 0x20, // .2, 2.2, 2.2)). | |
| 21 | 0x20, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x20, 0x2b, 0x20, // * tmpvar_1) + | |
| 22 | 0x70, 0x6f, 0x77, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2c, 0x20, 0x33, // pow (tmpvar_1, 3 | |
| 23 | 0x30, 0x2e, 0x30, 0x29, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, // 0.0)), vec3(0.45 | |
| 24 | 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, // 45454, 0.4545454 | |
| 25 | 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, // , 0.4545454));. | |
| 26 | 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // gl_FragColor = | |
| 27 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tmpvar_2;.}... | |
| 28 | 28 | }; |
| 29 | 29 | static const uint8_t fs_metaballs_dx9[429] = |
| 30 | 30 | { |
| r245594 | r245595 | |
|---|---|---|
| 675 | 675 | m_offsets[ii] = uint32_t(he - m_data); |
| 676 | 676 | |
| 677 | 677 | std::vector<uint16_t>& row = edges[ii]; |
| 678 | for (uint32_t jj = 0, e | |
| 678 | for (uint32_t jj = 0, size = (uint32_t)row.size(); jj < size; ++jj) | |
| 679 | 679 | { |
| 680 | 680 | he->m_secondIndex = row[jj]; |
| 681 | 681 | he->m_marked = false; |
| r245594 | r245595 | |
| 880 | 880 | for (uint32_t ii = 0, size = m_numIndices/3; ii < size; ++ii) |
| 881 | 881 | { |
| 882 | 882 | const uint16_t* indices = &m_indices[ii*3]; |
| 883 | const uint16_t i0 = indices[0]; | |
| 884 | const uint16_t i1 = indices[1]; | |
| 885 | const uint16_t i2 = indices[2]; | |
| 883 | uint16_t i0 = indices[0]; | |
| 884 | uint16_t i1 = indices[1]; | |
| 885 | uint16_t i2 = indices[2]; | |
| 886 | 886 | const float* v0 = (float*)&m_vertices[i0*stride]; |
| 887 | 887 | const float* v1 = (float*)&m_vertices[i1*stride]; |
| 888 | 888 | const float* v2 = (float*)&m_vertices[i2*stride]; |
| r245594 | r245595 | |
| 899 | 899 | |
| 900 | 900 | //Use unique indices for EdgeMap. |
| 901 | 901 | const uint16_t* uindices = &uniqueIndices[ii*3]; |
| 902 | const uint16_t ui0 = uindices[0]; | |
| 903 | const uint16_t ui1 = uindices[1]; | |
| 904 | const uint16_t ui2 = uindices[2]; | |
| 902 | i0 = uindices[0]; | |
| 903 | i1 = uindices[1]; | |
| 904 | i2 = uindices[2]; | |
| 905 | 905 | |
| 906 | 906 | const uint16_t triangleEdge[3][2] = |
| 907 | 907 | { |
| 908 | {ui0, ui1}, | |
| 909 | {ui1, ui2}, | |
| 910 | {ui2, ui0}, | |
| 908 | { i0, i1 }, | |
| 909 | { i1, i2 }, | |
| 910 | { i2, i0 }, | |
| 911 | 911 | }; |
| 912 | 912 | |
| 913 | 913 | for (uint8_t jj = 0; jj < 3; ++jj) |
| r245594 | r245595 | |
| 1511 | 1511 | } |
| 1512 | 1512 | else // ShadowVolumeAlgorithm::EdgeBased: |
| 1513 | 1513 | { |
| 1514 | uint32_t ii = 0; | |
| 1514 | { | |
| 1515 | uint32_t ii = 0; | |
| 1515 | 1516 | |
| 1516 | 1517 | #if SV_USE_SIMD |
| 1517 | uint32_t numEdgesRounded = numEdges & (~0x1); | |
| 1518 | uint32_t numEdgesRounded = numEdges & (~0x1); | |
| 1518 | 1519 | |
| 1519 | using namespace bx; | |
| 1520 | using namespace bx; | |
| 1520 | 1521 | |
| 1521 | const float4_t lx = float4_splat(_light[0]); | |
| 1522 | const float4_t ly = float4_splat(_light[1]); | |
| 1523 | const float4_t lz = float4_splat(_light[2]); | |
| 1522 | const float4_t lx = float4_splat(_light[0]); | |
| 1523 | const float4_t ly = float4_splat(_light[1]); | |
| 1524 | const float4_t lz = float4_splat(_light[2]); | |
| 1524 | 1525 | |
| 1525 | for (; ii < numEdgesRounded; ii+=2) | |
| 1526 | { | |
| 1527 | const Edge& edge0 = edges[ii]; | |
| 1528 | const Edge& edge1 = edges[ii+1]; | |
| 1529 | const Plane* edgePlane0 = &edgePlanes[ii*2]; | |
| 1530 | const Plane* edgePlane1 = &edgePlanes[ii*2 + 2]; | |
| 1526 | for (; ii < numEdgesRounded; ii+=2) | |
| 1527 | { | |
| 1528 | const Edge& edge0 = edges[ii]; | |
| 1529 | const Edge& edge1 = edges[ii+1]; | |
| 1530 | const Plane* edgePlane0 = &edgePlanes[ii*2]; | |
| 1531 | const Plane* edgePlane1 = &edgePlanes[ii*2 + 2]; | |
| 1531 | 1532 | |
| 1532 | const float4_t reverse = float4_ild(edge0.m_faceReverseOrder[0] | |
| 1533 | , edge1.m_faceReverseOrder[0] | |
| 1534 | , edge0.m_faceReverseOrder[1] | |
| 1535 | , edge1.m_faceReverseOrder[1] | |
| 1536 | ); | |
| 1533 | const float4_t reverse = | |
| 1534 | float4_ild(edge0.m_faceReverseOrder[0] | |
| 1535 | , edge1.m_faceReverseOrder[0] | |
| 1536 | , edge0.m_faceReverseOrder[1] | |
| 1537 | , edge1.m_faceReverseOrder[1] | |
| 1538 | ); | |
| 1537 | 1539 | |
| 1538 | const float4_t v0 = float4_ld(edgePlane0[0].m_plane); | |
| 1539 | const float4_t v1 = float4_ld(edgePlane1[0].m_plane); | |
| 1540 | const float4_t v2 = float4_ld(edgePlane0[1].m_plane); | |
| 1541 | const float4_t v3 = float4_ld(edgePlane1[1].m_plane); | |
| 1540 | const float4_t p00 = float4_ld(edgePlane0[0].m_plane); | |
| 1541 | const float4_t p10 = float4_ld(edgePlane1[0].m_plane); | |
| 1542 | const float4_t p01 = float4_ld(edgePlane0[1].m_plane); | |
| 1543 | const float4_t p11 = float4_ld(edgePlane1[1].m_plane); | |
| 1542 | 1544 | |
| 1543 | const float4_t xxyy0 = float4_shuf_xAyB(v0, v2); | |
| 1544 | const float4_t zzww0 = float4_shuf_zCwD(v0, v2); | |
| 1545 | const float4_t xxyy1 = float4_shuf_xAyB(v1, v3); | |
| 1546 | const float4_t zzww1 = float4_shuf_zCwD(v1, v3); | |
| 1545 | const float4_t xxyy0 = float4_shuf_xAyB(p00, p01); | |
| 1546 | const float4_t zzww0 = float4_shuf_zCwD(p00, p01); | |
| 1547 | const float4_t xxyy1 = float4_shuf_xAyB(p10, p11); | |
| 1548 | const float4_t zzww1 = float4_shuf_zCwD(p10, p11); | |
| 1547 | 1549 | |
| 1548 | const float4_t vX = float4_shuf_xAyB(xxyy0, xxyy1); | |
| 1549 | const float4_t vY = float4_shuf_zCwD(xxyy0, xxyy1); | |
| 1550 | const float4_t vZ = float4_shuf_xAyB(zzww0, zzww1); | |
| 1551 | const float4_t vW = float4_shuf_zCwD(zzww0, zzww1); | |
| 1550 | const float4_t vX = float4_shuf_xAyB(xxyy0, xxyy1); | |
| 1551 | const float4_t vY = float4_shuf_zCwD(xxyy0, xxyy1); | |
| 1552 | const float4_t vZ = float4_shuf_xAyB(zzww0, zzww1); | |
| 1553 | const float4_t vW = float4_shuf_zCwD(zzww0, zzww1); | |
| 1552 | 1554 | |
| 1553 | const float4_t r0 = float4_mul(vX, lx); | |
| 1554 | const float4_t r1 = float4_mul(vY, ly); | |
| 1555 | const float4_t r2 = float4_mul(vZ, lz); | |
| 1555 | const float4_t r0 = float4_mul(vX, lx); | |
| 1556 | const float4_t r1 = float4_mul(vY, ly); | |
| 1557 | const float4_t r2 = float4_mul(vZ, lz); | |
| 1556 | 1558 | |
| 1557 | const float4_t dot = float4_add(r0, float4_add(r1, r2)); | |
| 1558 | const float4_t f = float4_add(dot, vW); | |
| 1559 | const float4_t dot = float4_add(r0, float4_add(r1, r2)); | |
| 1560 | const float4_t f = float4_add(dot, vW); | |
| 1559 | 1561 | |
| 1560 | const float4_t zero = float4_zero(); | |
| 1561 | const float4_t mask = float4_cmpgt(f, zero); | |
| 1562 | const float4_t onef = float4_splat(1.0f); | |
| 1563 | const float4_t tmp0 = float4_and(mask, onef); | |
| 1564 | const float4_t tmp1 = float4_ftoi(tmp0); | |
| 1565 | const float4_t tmp2 = float4_xor(tmp1, reverse); | |
| 1566 | const float4_t tmp3 = float4_sll(tmp2, 1); | |
| 1567 | const float4_t onei = float4_isplat(1); | |
| 1568 | const float4_t tmp4 = float4_isub(tmp3, onei); | |
| 1562 | const float4_t zero = float4_zero(); | |
| 1563 | const float4_t mask = float4_cmpgt(f, zero); | |
| 1564 | const float4_t onef = float4_splat(1.0f); | |
| 1565 | const float4_t tmp0 = float4_and(mask, onef); | |
| 1566 | const float4_t tmp1 = float4_ftoi(tmp0); | |
| 1567 | const float4_t tmp2 = float4_xor(tmp1, reverse); | |
| 1568 | const float4_t tmp3 = float4_sll(tmp2, 1); | |
| 1569 | const float4_t onei = float4_isplat(1); | |
| 1570 | const float4_t tmp4 = float4_isub(tmp3, onei); | |
| 1569 | 1571 | |
| 1570 | BX_ALIGN_DECL_16(int32_t res[4]); | |
| 1571 | float4_st(&res, tmp4); | |
| 1572 | BX_ALIGN_DECL_16(int32_t res[4]); | |
| 1573 | float4_st(&res, tmp4); | |
| 1572 | 1574 | |
| 1573 | for (uint16_t jj = 0; jj < 2; ++jj) | |
| 1575 | for (uint16_t jj = 0; jj < 2; ++jj) | |
| 1576 | { | |
| 1577 | int16_t kk = res[jj] + res[jj+2]; | |
| 1578 | if (kk != 0) | |
| 1579 | { | |
| 1580 | float* v0 = (float*)&vertices[edges[ii+jj].m_i0*_stride]; | |
| 1581 | float* v1 = (float*)&vertices[edges[ii+jj].m_i1*_stride]; | |
| 1582 | verticesSide[vsideI++] = VertexData(v0, 0.0f, float(kk) ); | |
| 1583 | verticesSide[vsideI++] = VertexData(v0, 1.0f, float(kk) ); | |
| 1584 | verticesSide[vsideI++] = VertexData(v1, 0.0f, float(kk) ); | |
| 1585 | verticesSide[vsideI++] = VertexData(v1, 1.0f, float(kk) ); | |
| 1586 | ||
| 1587 | kk = _textureAsStencil ? 1 : kk; | |
| 1588 | uint16_t winding = uint16_t(kk > 0); | |
| 1589 | for (uint8_t ll = 0, end = abs(kk); ll < end; ++ll) | |
| 1590 | { | |
| 1591 | indicesSide[sideI++] = indexSide; | |
| 1592 | indicesSide[sideI++] = indexSide + 2 - winding; | |
| 1593 | indicesSide[sideI++] = indexSide + 1 + winding; | |
| 1594 | ||
| 1595 | indicesSide[sideI++] = indexSide + 2; | |
| 1596 | indicesSide[sideI++] = indexSide + 3 - winding*2; | |
| 1597 | indicesSide[sideI++] = indexSide + 1 + winding*2; | |
| 1598 | } | |
| 1599 | ||
| 1600 | indexSide += 4; | |
| 1601 | } | |
| 1602 | } | |
| 1603 | } | |
| 1604 | #endif | |
| 1605 | ||
| 1606 | for (; ii < numEdges; ++ii) | |
| 1574 | 1607 | { |
| 1575 | int16_t k = res[jj] + res[jj+2]; | |
| 1576 | if (k != 0) | |
| 1608 | const Edge& edge = edges[ii]; | |
| 1609 | const Plane* edgePlane = &edgePlanes[ii*2]; | |
| 1610 | ||
| 1611 | int16_t s0 = ( (vec3Dot(edgePlane[0].m_plane, _light) + edgePlane[0].m_plane[3]) > 0.0f) ^ edge.m_faceReverseOrder[0]; | |
| 1612 | int16_t s1 = ( (vec3Dot(edgePlane[1].m_plane, _light) + edgePlane[1].m_plane[3]) > 0.0f) ^ edge.m_faceReverseOrder[1]; | |
| 1613 | int16_t kk = ( (s0 + s1) << 1) - 2; | |
| 1614 | ||
| 1615 | if (kk != 0) | |
| 1577 | 1616 | { |
| 1578 | float* v0 = (float*)&vertices[edges[ii+jj].m_i0*_stride]; | |
| 1579 | float* v1 = (float*)&vertices[edges[ii+jj].m_i1*_stride]; | |
| 1580 | verticesSide[vsideI++] = VertexData(v0, 0.0f, float(k)); | |
| 1581 | verticesSide[vsideI++] = VertexData(v0, 1.0f, float(k)); | |
| 1582 | verticesSide[vsideI++] = VertexData(v1, 0.0f, float(k)); | |
| 1583 | verticesSide[vsideI++] = VertexData(v1, 1.0f, float(k)); | |
| 1617 | float* v0 = (float*)&vertices[edge.m_i0*_stride]; | |
| 1618 | float* v1 = (float*)&vertices[edge.m_i1*_stride]; | |
| 1619 | verticesSide[vsideI++] = VertexData(v0, 0.0f, kk); | |
| 1620 | verticesSide[vsideI++] = VertexData(v0, 1.0f, kk); | |
| 1621 | verticesSide[vsideI++] = VertexData(v1, 0.0f, kk); | |
| 1622 | verticesSide[vsideI++] = VertexData(v1, 1.0f, kk); | |
| 1584 | 1623 | |
| 1585 | k = _textureAsStencil ? 1 : k; | |
| 1586 | uint16_t winding = uint16_t(k > 0); | |
| 1587 | for (uint8_t ii = 0, end = abs(k); ii < end; ++ii) | |
| 1624 | kk = _textureAsStencil ? 1 : kk; | |
| 1625 | uint16_t winding = uint16_t(kk > 0); | |
| 1626 | for (uint8_t jj = 0, end = abs(kk); jj < end; ++jj) | |
| 1588 | 1627 | { |
| 1589 | 1628 | indicesSide[sideI++] = indexSide; |
| 1590 | 1629 | indicesSide[sideI++] = indexSide + 2 - winding; |
| r245594 | r245595 | |
| 1599 | 1638 | } |
| 1600 | 1639 | } |
| 1601 | 1640 | } |
| 1602 | #endif | |
| 1603 | 1641 | |
| 1604 | for (; ii < numEdges; ++ii) | |
| 1605 | { | |
| 1606 | const Edge& edge = edges[ii]; | |
| 1607 | const Plane* edgePlane = &edgePlanes[ii*2]; | |
| 1608 | ||
| 1609 | int16_t s0 = ( (vec3Dot(edgePlane[0].m_plane, _light) + edgePlane[0].m_plane[3]) > 0.0f) ^ edge.m_faceReverseOrder[0]; | |
| 1610 | int16_t s1 = ( (vec3Dot(edgePlane[1].m_plane, _light) + edgePlane[1].m_plane[3]) > 0.0f) ^ edge.m_faceReverseOrder[1]; | |
| 1611 | int16_t k = ( (s0 + s1) << 1) - 2; | |
| 1612 | ||
| 1613 | if (k != 0) | |
| 1614 | { | |
| 1615 | float* v0 = (float*)&vertices[edge.m_i0*_stride]; | |
| 1616 | float* v1 = (float*)&vertices[edge.m_i1*_stride]; | |
| 1617 | verticesSide[vsideI++] = VertexData(v0, 0.0f, k); | |
| 1618 | verticesSide[vsideI++] = VertexData(v0, 1.0f, k); | |
| 1619 | verticesSide[vsideI++] = VertexData(v1, 0.0f, k); | |
| 1620 | verticesSide[vsideI++] = VertexData(v1, 1.0f, k); | |
| 1621 | ||
| 1622 | k = _textureAsStencil ? 1 : k; | |
| 1623 | uint16_t winding = uint16_t(k > 0); | |
| 1624 | for (uint8_t ii = 0, end = abs(k); ii < end; ++ii) | |
| 1625 | { | |
| 1626 | indicesSide[sideI++] = indexSide; | |
| 1627 | indicesSide[sideI++] = indexSide + 2 - winding; | |
| 1628 | indicesSide[sideI++] = indexSide + 1 + winding; | |
| 1629 | ||
| 1630 | indicesSide[sideI++] = indexSide + 2; | |
| 1631 | indicesSide[sideI++] = indexSide + 3 - winding*2; | |
| 1632 | indicesSide[sideI++] = indexSide + 1 + winding*2; | |
| 1633 | } | |
| 1634 | ||
| 1635 | indexSide += 4; | |
| 1636 | } | |
| 1637 | } | |
| 1638 | ||
| 1639 | 1642 | if (cap) |
| 1640 | 1643 | { |
| 1641 | 1644 | // This could/should be done on GPU! |
| r245594 | r245595 | |
| 1643 | 1646 | { |
| 1644 | 1647 | const Face& face = *iter; |
| 1645 | 1648 | |
| 1646 | float f = vec3Dot(face.m_plane, _light) + face.m_plane[3]; | |
| 1649 | float f = bx::vec3Dot(face.m_plane, _light) + face.m_plane[3]; | |
| 1647 | 1650 | bool frontFacing = (f > 0.0f); |
| 1648 | 1651 | |
| 1649 | for (uint8_t ii = 0, | |
| 1652 | for (uint8_t ii = 0, num = 1 + uint8_t(!_textureAsStencil); ii < num; ++ii) | |
| 1650 | 1653 | { |
| 1651 | 1654 | if (frontFacing) |
| 1652 | 1655 | { |
| r245594 | r245595 | |
| 2791 | 2794 | viewId += uint8_t(settings_useStencilTexture); |
| 2792 | 2795 | |
| 2793 | 2796 | // Draw shadow casters. |
| 2794 | for (uint8_t | |
| 2797 | for (uint8_t jj = 0; jj < shadowCastersCount[currentScene]; ++jj) | |
| 2795 | 2798 | { |
| 2796 | shadowCasters[currentScene][ | |
| 2799 | shadowCasters[currentScene][jj].submit(viewId, drawDiffuse); | |
| 2797 | 2800 | } |
| 2798 | 2801 | |
| 2799 | 2802 | // Draw shadow receivers. |
| 2800 | for (uint8_t | |
| 2803 | for (uint8_t jj = 0; jj < shadowReceiversCount[currentScene]; ++jj) | |
| 2801 | 2804 | { |
| 2802 | shadowReceivers[currentScene][ | |
| 2805 | shadowReceivers[currentScene][jj].submit(viewId, drawDiffuse); | |
| 2803 | 2806 | } |
| 2804 | 2807 | } |
| 2805 | 2808 |
| r245594 | r245595 | |
|---|---|---|
| 186 | 186 | float view[16]; |
| 187 | 187 | float proj[16]; |
| 188 | 188 | |
| 189 | const float eye[3] = { 0.0f, 30.0f, -60.0f }; | |
| 190 | const float at[3] = { 0.0f, 5.0f, 0.0f }; | |
| 189 | float eye[3] = { 0.0f, 30.0f, -60.0f }; | |
| 190 | float at[3] = { 0.0f, 5.0f, 0.0f }; | |
| 191 | 191 | bx::mtxLookAt(view, eye, at); |
| 192 | 192 | |
| 193 | 193 | const float aspect = float(int32_t(width) ) / float(int32_t(height) ); |
| r245594 | r245595 | |
| 261 | 261 | float lightView[16]; |
| 262 | 262 | float lightProj[16]; |
| 263 | 263 | |
| 264 | const float eye[3] = | |
| 265 | { | |
| 266 | -lightPos[0], | |
| 267 | -lightPos[1], | |
| 268 | -lightPos[2], | |
| 269 | }; | |
| 270 | const float at[3] = { 0.0f, 0.0f, 0.0f }; | |
| 264 | eye[0] = -lightPos[0]; | |
| 265 | eye[0] = -lightPos[1]; | |
| 266 | eye[0] = -lightPos[2]; | |
| 267 | ||
| 268 | at[0] = 0.0f; | |
| 269 | at[1] = 0.0f; | |
| 270 | at[2] = 0.0f; | |
| 271 | ||
| 271 | 272 | bx::mtxLookAt(lightView, eye, at); |
| 272 | 273 | |
| 273 | 274 | const float area = 30.0f; |
| r245594 | r245595 | |
|---|---|---|
| 2452 | 2452 | } |
| 2453 | 2453 | |
| 2454 | 2454 | // Determine on-screen rectangle size where depth buffer will be drawn. |
| 2455 | const uint16_t depthRectHeight = uint16_t(float(viewState.m_height) / 2.5f); | |
| 2456 | const uint16_t depthRectWidth = depthRectHeight; | |
| 2457 | const uint16_t depthRectX = 0; | |
| 2458 | const uint16_t depthRectY = viewState.m_height - depthRectHeight; | |
| 2455 | uint16_t depthRectHeight = uint16_t(float(viewState.m_height) / 2.5f); | |
| 2456 | uint16_t depthRectWidth = depthRectHeight; | |
| 2457 | uint16_t depthRectX = 0; | |
| 2458 | uint16_t depthRectY = viewState.m_height - depthRectHeight; | |
| 2459 | 2459 | |
| 2460 | 2460 | // Setup views and render targets. |
| 2461 | 2461 | bgfx::setViewRect(0, 0, 0, viewState.m_width, viewState.m_height); |
| r245594 | r245595 | |
| 2583 | 2583 | * RENDERVIEW_DRAWDEPTH_3_ID - Draw depth buffer for fourth split. |
| 2584 | 2584 | */ |
| 2585 | 2585 | |
| 2586 | const uint16_t depthRectHeight = viewState.m_height / 3; | |
| 2587 | const uint16_t depthRectWidth = depthRectHeight; | |
| 2588 | const uint16_t depthRectX = 0; | |
| 2589 | const uint16_t depthRectY = viewState.m_height - depthRectHeight; | |
| 2586 | depthRectHeight = viewState.m_height / 3; | |
| 2587 | depthRectWidth = depthRectHeight; | |
| 2588 | depthRectX = 0; | |
| 2589 | depthRectY = viewState.m_height - depthRectHeight; | |
| 2590 | 2590 | |
| 2591 | 2591 | bgfx::setViewRect(RENDERVIEW_SHADOWMAP_1_ID, 0, 0, currentShadowMapSize, currentShadowMapSize); |
| 2592 | 2592 | bgfx::setViewRect(RENDERVIEW_SHADOWMAP_2_ID, 0, 0, currentShadowMapSize, currentShadowMapSize); |
| r245594 | r245595 | |
| 2795 | 2795 | ); |
| 2796 | 2796 | |
| 2797 | 2797 | // Trees. |
| 2798 | for (uint8_t | |
| 2798 | for (uint8_t jj = 0; jj < numTrees; ++jj) | |
| 2799 | 2799 | { |
| 2800 | 2800 | treeMesh.submit(viewId |
| 2801 | , mtxTrees[ | |
| 2801 | , mtxTrees[jj] | |
| 2802 | 2802 | , *currentSmSettings->m_progPack |
| 2803 | 2803 | , s_renderStates[renderStateIndex] |
| 2804 | 2804 | ); |
| r245594 | r245595 | |
| 2851 | 2851 | float mtxShadow[16]; |
| 2852 | 2852 | |
| 2853 | 2853 | const float ymul = (s_flipV) ? 0.5f : -0.5f; |
| 2854 | | |
| 2854 | float zadd = (DepthImpl::Linear == settings.m_depthImpl) ? 0.0f : 0.5f; | |
| 2855 | 2855 | |
| 2856 | 2856 | const float mtxBias[16] = |
| 2857 | 2857 | { |
| r245594 | r245595 | |
| 2870 | 2870 | else if (LightType::PointLight == settings.m_lightType) |
| 2871 | 2871 | { |
| 2872 | 2872 | const float s = (s_flipV) ? 1.0f : -1.0f; //sign |
| 2873 | | |
| 2873 | zadd = (DepthImpl::Linear == settings.m_depthImpl) ? 0.0f : 0.5f; | |
| 2874 | 2874 | |
| 2875 | 2875 | const float mtxCropBias[2][TetrahedronFaces::Count][16] = |
| 2876 | 2876 | { |
| r245594 | r245595 | |
|---|---|---|
| 29 | 29 | #if ENTRY_CONFIG_IMPLEMENT_DEFAULT_ALLOCATOR |
| 30 | 30 | bx::ReallocatorI* getDefaultAllocator() |
| 31 | 31 | { |
| 32 | BX_PRAGMA_DIAGNOSTIC_PUSH | |
| 32 | BX_PRAGMA_DIAGNOSTIC_PUSH(); | |
| 33 | 33 | BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4459); // warning C4459: declaration of 's_allocator' hides global declaration |
| 34 | BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow"); | |
| 34 | 35 | static bx::CrtAllocator s_allocator; |
| 35 | 36 | return &s_allocator; |
| 36 | BX_PRAGMA_DIAGNOSTIC_POP | |
| 37 | BX_PRAGMA_DIAGNOSTIC_POP(); | |
| 37 | 38 | } |
| 38 | 39 | #endif // ENTRY_CONFIG_IMPLEMENT_DEFAULT_ALLOCATOR |
| 39 | 40 |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_font_basic_glsl[5 | |
| 1 | static const uint8_t fs_font_basic_glsl[553] = | |
| 2 | 2 | { |
| 3 | 3 | 0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex |
| 4 | 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0 | |
| 4 | 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x09, 0x02, 0x00, 0x00, 0x76, // Color..........v | |
| 5 | 5 | 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec |
| 6 | 6 | 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary |
| 7 | 7 | 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ing highp vec4 v |
| r245594 | r245595 | |
| 15 | 15 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, // tmpvar_2 = textu |
| 16 | 16 | 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // reCube (u_texCol |
| 17 | 17 | 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, // or, v_texcoord0. |
| 18 | 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, // xyz);. int tmpv | |
| 19 | 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // ar_3;. tmpvar_3 | |
| 20 | 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x28, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // = int(((v_texco | |
| 21 | 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x34, 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, // ord0.w * 4.0) + | |
| 22 | 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, // 0.5));. rgba_1[ | |
| 23 | 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x3b, // 0] = tmpvar_2.z; | |
| 24 | 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x74, // . rgba_1[1] = t | |
| 25 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, // mpvar_2.y;. rgb | |
| 26 | 0x61, 0x5f, 0x31, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // a_1[2] = tmpvar_ | |
| 27 | 0x32, 0x2e, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x33, 0x5d, // 2.x;. rgba_1[3] | |
| 28 | 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x3b, 0x0a, 0x20, // = tmpvar_2.w;. | |
| 29 | 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // lowp vec4 tmpva | |
| 30 | 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, // r_4;. tmpvar_4. | |
| 31 | 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, // xyz = v_color0.x | |
| 32 | 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x77, // yz;. tmpvar_4.w | |
| 33 | 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x20, 0x2a, // = (v_color0.w * | |
| 34 | 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // rgba_1[tmpvar_3 | |
| 35 | 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // ]);. gl_FragCol | |
| 36 | 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, // or = tmpvar_4;.} | |
| 37 | 0x0a, 0x0a, 0x00, // ... | |
| 18 | 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, // xyz);. highp in | |
| 19 | 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // t tmpvar_3;. tm | |
| 20 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x28, 0x28, 0x76, // pvar_3 = int(((v | |
| 21 | 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x34, // _texcoord0.w * 4 | |
| 22 | 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, // .0) + 0.5));. r | |
| 23 | 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // gba_1[0] = tmpva | |
| 24 | 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, // r_2.z;. rgba_1[ | |
| 25 | 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x79, 0x3b, // 1] = tmpvar_2.y; | |
| 26 | 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x74, // . rgba_1[2] = t | |
| 27 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, // mpvar_2.x;. rgb | |
| 28 | 0x61, 0x5f, 0x31, 0x5b, 0x33, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // a_1[3] = tmpvar_ | |
| 29 | 0x32, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // 2.w;. lowp vec4 | |
| 30 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_4;. tmp | |
| 31 | 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, // var_4.xyz = v_co | |
| 32 | 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // lor0.xyz;. tmpv | |
| 33 | 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ar_4.w = (v_colo | |
| 34 | 0x72, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x74, 0x6d, // r0.w * rgba_1[tm | |
| 35 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // pvar_3]);. gl_F | |
| 36 | 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva | |
| 37 | 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_4;.}... | |
| 38 | 38 | }; |
| 39 | 39 | static const uint8_t fs_font_basic_dx9[445] = |
| 40 | 40 | { |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_font_distance_field_glsl[101 | |
| 1 | static const uint8_t fs_font_distance_field_glsl[1019] = | |
| 2 | 2 | { |
| 3 | 3 | 0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex |
| 4 | 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd | |
| 4 | 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdb, 0x03, 0x00, 0x00, 0x76, // Color..........v | |
| 5 | 5 | 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec |
| 6 | 6 | 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary |
| 7 | 7 | 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ing highp vec4 v |
| r245594 | r245595 | |
| 15 | 15 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, // tmpvar_2 = textu |
| 16 | 16 | 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // reCube (u_texCol |
| 17 | 17 | 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, // or, v_texcoord0. |
| 18 | 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, // xyz);. int tmpv | |
| 19 | 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // ar_3;. tmpvar_3 | |
| 20 | 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x28, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // = int(((v_texco | |
| 21 | 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x34, 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, // ord0.w * 4.0) + | |
| 22 | 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, // 0.5));. rgba_1[ | |
| 23 | 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x3b, // 0] = tmpvar_2.z; | |
| 24 | 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x74, // . rgba_1[1] = t | |
| 25 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, // mpvar_2.y;. rgb | |
| 26 | 0x61, 0x5f, 0x31, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // a_1[2] = tmpvar_ | |
| 27 | 0x32, 0x2e, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x33, 0x5d, // 2.x;. rgba_1[3] | |
| 28 | 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x3b, 0x0a, 0x20, // = tmpvar_2.w;. | |
| 29 | 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, // highp vec3 tmpv | |
| 30 | 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, // ar_4;. tmpvar_4 | |
| 31 | 0x20, 0x3d, 0x20, 0x64, 0x46, 0x64, 0x78, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // = dFdx(v_texcoo | |
| 32 | 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, // rd0.xyz);. high | |
| 33 | 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, // p vec3 tmpvar_5; | |
| 34 | 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x64, 0x46, // . tmpvar_5 = dF | |
| 35 | 0x64, 0x79, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, // dy(v_texcoord0.x | |
| 36 | 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, // yz);. highp flo | |
| 37 | 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, // at tmpvar_6;. t | |
| 38 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, // mpvar_6 = (8.0 * | |
| 39 | 0x20, 0x28, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, // (sqrt(. dot | |
| 40 | 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // (tmpvar_4, tmpva | |
| 41 | 0x72, 0x5f, 0x34, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, // r_4). ) + sqrt( | |
| 42 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // . dot (tmpvar | |
| 43 | 0x5f, 0x35, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x29, 0x0a, 0x20, 0x20, // _5, tmpvar_5). | |
| 44 | 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, // )));. highp flo | |
| 45 | 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, // at edge0_7;. ed | |
| 46 | 0x67, 0x65, 0x30, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, // ge0_7 = (0.5 - t | |
| 47 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, // mpvar_6);. lowp | |
| 48 | 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, // float tmpvar_8; | |
| 49 | 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x63, 0x6c, // . tmpvar_8 = cl | |
| 50 | 0x61, 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x74, 0x6d, // amp (((rgba_1[tm | |
| 51 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x5d, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, // pvar_3] - edge0_ | |
| 52 | 0x37, 0x29, 0x20, 0x2f, 0x20, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, // 7) / (. (0.5 | |
| 53 | 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2d, // + tmpvar_6). - | |
| 54 | 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x29, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, // edge0_7)), 0.0, | |
| 55 | 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, // 1.0);. lowp ve | |
| 56 | 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_9;. t | |
| 57 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x5f, // mpvar_9.xyz = v_ | |
| 58 | 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // color0.xyz;. tm | |
| 59 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, // pvar_9.w = (v_co | |
| 60 | 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // lor0.w * (tmpvar | |
| 61 | 0x5f, 0x38, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x2a, // _8 * (tmpvar_8 * | |
| 62 | 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x33, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x28, 0x32, 0x2e, // . (3.0 - (2. | |
| 63 | 0x30, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x29, 0x29, 0x0a, 0x20, // 0 * tmpvar_8)). | |
| 64 | 0x20, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // )));. gl_FragC | |
| 65 | 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, // olor = tmpvar_9; | |
| 66 | 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... | |
| 18 | 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, // xyz);. highp in | |
| 19 | 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // t tmpvar_3;. tm | |
| 20 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x28, 0x28, 0x76, // pvar_3 = int(((v | |
| 21 | 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x34, // _texcoord0.w * 4 | |
| 22 | 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, // .0) + 0.5));. r | |
| 23 | 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // gba_1[0] = tmpva | |
| 24 | 0x72, 0x5f, 0x32, 0x2e, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, // r_2.z;. rgba_1[ | |
| 25 | 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x79, 0x3b, // 1] = tmpvar_2.y; | |
| 26 | 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x74, // . rgba_1[2] = t | |
| 27 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, // mpvar_2.x;. rgb | |
| 28 | 0x61, 0x5f, 0x31, 0x5b, 0x33, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // a_1[3] = tmpvar_ | |
| 29 | 0x32, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // 2.w;. highp vec | |
| 30 | 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 3 tmpvar_4;. tm | |
| 31 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x64, 0x46, 0x64, 0x78, 0x28, 0x76, 0x5f, // pvar_4 = dFdx(v_ | |
| 32 | 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, // texcoord0.xyz);. | |
| 33 | 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, // highp vec3 tmp | |
| 34 | 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // var_5;. tmpvar_ | |
| 35 | 0x35, 0x20, 0x3d, 0x20, 0x64, 0x46, 0x64, 0x79, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // 5 = dFdy(v_texco | |
| 36 | 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, // ord0.xyz);. hig | |
| 37 | 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // hp float tmpvar_ | |
| 38 | 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x20, 0x3d, 0x20, // 6;. tmpvar_6 = | |
| 39 | 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, // (8.0 * (sqrt(. | |
| 40 | 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2c, // dot (tmpvar_4, | |
| 41 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, // tmpvar_4). ) + | |
| 42 | 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, // sqrt(. dot ( | |
| 43 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // tmpvar_5, tmpvar | |
| 44 | 0x5f, 0x35, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, // _5). )));. hig | |
| 45 | 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, // hp float edge0_7 | |
| 46 | 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x28, 0x30, // ;. edge0_7 = (0 | |
| 47 | 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x3b, 0x0a, // .5 - tmpvar_6);. | |
| 48 | 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, // lowp float tmp | |
| 49 | 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // var_8;. tmpvar_ | |
| 50 | 0x38, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x72, 0x67, 0x62, // 8 = clamp (((rgb | |
| 51 | 0x61, 0x5f, 0x31, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x5d, 0x20, 0x2d, 0x20, // a_1[tmpvar_3] - | |
| 52 | 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x29, 0x20, 0x2f, 0x20, 0x28, 0x0a, 0x20, 0x20, 0x20, // edge0_7) / (. | |
| 53 | 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, // (0.5 + tmpvar_6 | |
| 54 | 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x37, 0x29, 0x29, // ). - edge0_7)) | |
| 55 | 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, // , 0.0, 1.0);. l | |
| 56 | 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // owp vec4 tmpvar_ | |
| 57 | 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x78, 0x79, // 9;. tmpvar_9.xy | |
| 58 | 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, // z = v_color0.xyz | |
| 59 | 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x77, 0x20, 0x3d, // ;. tmpvar_9.w = | |
| 60 | 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x28, // (v_color0.w * ( | |
| 61 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, // tmpvar_8 * (tmpv | |
| 62 | 0x61, 0x72, 0x5f, 0x38, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x33, 0x2e, 0x30, // ar_8 * . (3.0 | |
| 63 | 0x20, 0x2d, 0x20, 0x28, 0x32, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // - (2.0 * tmpvar | |
| 64 | 0x5f, 0x38, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // _8)). )));. gl | |
| 65 | 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp | |
| 66 | 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_9;.}... | |
| 67 | 67 | }; |
| 68 | 68 | static const uint8_t fs_font_distance_field_dx9[737] = |
| 69 | 69 | { |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_font_distance_field_subpixel_glsl[126 | |
| 1 | static const uint8_t fs_font_distance_field_subpixel_glsl[1268] = | |
| 2 | 2 | { |
| 3 | 3 | 0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex |
| 4 | 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x | |
| 4 | 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x04, 0x00, 0x00, 0x76, // Color..........v | |
| 5 | 5 | 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec |
| 6 | 6 | 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary |
| 7 | 7 | 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ing highp vec4 v |
| r245594 | r245595 | |
| 9 | 9 | 0x6f, 0x72, 0x6d, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // orm lowp sampler |
| 10 | 10 | 0x43, 0x75, 0x62, 0x65, 0x20, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, // Cube u_texColor; |
| 11 | 11 | 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. |
| 12 | 0x20, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // int tmpvar_1;. | |
| 13 | 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, // tmpvar_1 = int | |
| 14 | 0x28, 0x28, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x77, // (((v_texcoord0.w | |
| 15 | 0x20, 0x2a, 0x20, 0x34, 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, // * 4.0) + 0.5)); | |
| 16 | 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, // . highp vec3 tm | |
| 17 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // pvar_2;. tmpvar | |
| 18 | 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x64, 0x46, 0x64, 0x78, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // _2 = dFdx(v_texc | |
| 19 | 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, // oord0.xyz);. hi | |
| 20 | 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ghp vec3 tmpvar_ | |
| 21 | 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, // 3;. tmpvar_3 = | |
| 22 | 0x64, 0x46, 0x64, 0x79, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // dFdy(v_texcoord0 | |
| 23 | 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // .xyz);. highp v | |
| 24 | 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, // ec3 tmpvar_4;. | |
| 25 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x31, 0x36, // tmpvar_4 = (0.16 | |
| 26 | 0x36, 0x36, 0x36, 0x37, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, // 6667 * tmpvar_2) | |
| 27 | 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, // ;. lowp float t | |
| 28 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_5;. tmpva | |
| 29 | 0x72, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, // r_5 = textureCub | |
| 30 | 0x65, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, // e (u_texColor, ( | |
| 31 | 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, // v_texcoord0.xyz | |
| 32 | 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x29, 0x2e, 0x7a, 0x79, 0x78, // - tmpvar_4)).zyx | |
| 33 | 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x6c, // w[tmpvar_1];. l | |
| 34 | 0x6f, 0x77, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // owp float tmpvar | |
| 35 | 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x20, 0x3d, // _6;. tmpvar_6 = | |
| 36 | 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x20, 0x28, 0x75, 0x5f, // textureCube (u_ | |
| 37 | 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, // texColor, (v_tex | |
| 38 | 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, // coord0.xyz + tmp | |
| 39 | 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x29, 0x2e, 0x7a, 0x79, 0x78, 0x77, 0x5b, 0x74, 0x6d, 0x70, // var_4)).zyxw[tmp | |
| 40 | 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, // var_1];. lowp f | |
| 41 | 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x3b, 0x0a, 0x20, // loat tmpvar_7;. | |
| 42 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, // tmpvar_7 = (0.5 | |
| 43 | 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x2b, 0x20, 0x74, // * (tmpvar_5 + t | |
| 44 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, // mpvar_6));. hig | |
| 45 | 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // hp float tmpvar_ | |
| 46 | 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x20, 0x3d, 0x20, // 8;. tmpvar_8 = | |
| 47 | 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, // (8.0 * (sqrt(. | |
| 48 | 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2c, // dot (tmpvar_2, | |
| 49 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, // tmpvar_2). ) + | |
| 50 | 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, // sqrt(. dot ( | |
| 51 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // tmpvar_3, tmpvar | |
| 52 | 0x5f, 0x33, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, // _3). )));. low | |
| 53 | 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, // p vec3 tmpvar_9; | |
| 54 | 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x78, 0x20, 0x3d, 0x20, // . tmpvar_9.x = | |
| 55 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_5;. tmpv | |
| 56 | 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ar_9.y = tmpvar_ | |
| 57 | 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x7a, 0x20, // 7;. tmpvar_9.z | |
| 58 | 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, // = tmpvar_6;. lo | |
| 59 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // wp vec3 tmpvar_1 | |
| 60 | 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // 0;. highp float | |
| 61 | 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, // edge0_11;. edg | |
| 62 | 0x65, 0x30, 0x5f, 0x31, 0x31, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, // e0_11 = (0.5 - t | |
| 63 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, // mpvar_8);. lowp | |
| 64 | 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x3b, // vec3 tmpvar_12; | |
| 65 | 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x63, // . tmpvar_12 = c | |
| 66 | 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, // lamp (((tmpvar_9 | |
| 67 | 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x31, 0x29, 0x20, 0x2f, 0x20, 0x28, // - edge0_11) / ( | |
| 68 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, // . (0.5 + tmpv | |
| 69 | 0x61, 0x72, 0x5f, 0x38, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, // ar_8). - edge0 | |
| 70 | 0x5f, 0x31, 0x31, 0x29, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, // _11)), 0.0, 1.0) | |
| 71 | 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x20, 0x3d, 0x20, // ;. tmpvar_10 = | |
| 72 | 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, // (tmpvar_12 * (tm | |
| 73 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x20, 0x2a, 0x20, 0x28, 0x33, 0x2e, 0x30, 0x20, 0x2d, // pvar_12 * (3.0 - | |
| 74 | 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x32, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, // . (2.0 * tmp | |
| 75 | 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, // var_12). )));. | |
| 76 | 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x78, 0x79, // gl_FragColor.xy | |
| 77 | 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x20, 0x2a, // z = (tmpvar_10 * | |
| 78 | 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x3b, 0x0a, 0x20, 0x20, // v_color0.w);. | |
| 79 | 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x77, 0x20, 0x3d, // gl_FragColor.w = | |
| 80 | 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, // (tmpvar_7 * v_c | |
| 81 | 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // olor0.w);.}... | |
| 12 | 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, // highp int tmpv | |
| 13 | 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // ar_1;. tmpvar_1 | |
| 14 | 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x28, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // = int(((v_texco | |
| 15 | 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x77, 0x20, 0x2a, 0x20, 0x34, 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, // ord0.w * 4.0) + | |
| 16 | 0x30, 0x2e, 0x35, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // 0.5));. highp v | |
| 17 | 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, // ec3 tmpvar_2;. | |
| 18 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x64, 0x46, 0x64, 0x78, 0x28, // tmpvar_2 = dFdx( | |
| 19 | 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, // v_texcoord0.xyz) | |
| 20 | 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, // ;. highp vec3 t | |
| 21 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_3;. tmpva | |
| 22 | 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x64, 0x46, 0x64, 0x79, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, // r_3 = dFdy(v_tex | |
| 23 | 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, // coord0.xyz);. h | |
| 24 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ighp vec3 tmpvar | |
| 25 | 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, // _4;. tmpvar_4 = | |
| 26 | 0x20, 0x28, 0x30, 0x2e, 0x31, 0x36, 0x36, 0x36, 0x36, 0x37, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, // (0.166667 * tmp | |
| 27 | 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, // var_2);. lowp f | |
| 28 | 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, // loat tmpvar_5;. | |
| 29 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, // tmpvar_5 = text | |
| 30 | 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // ureCube (u_texCo | |
| 31 | 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // lor, (v_texcoord | |
| 32 | 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, // 0.xyz - tmpvar_4 | |
| 33 | 0x29, 0x29, 0x2e, 0x7a, 0x79, 0x78, 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // )).zyxw[tmpvar_1 | |
| 34 | 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, // ];. lowp float | |
| 35 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_6;. tmpv | |
| 36 | 0x61, 0x72, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, // ar_6 = textureCu | |
| 37 | 0x62, 0x65, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, // be (u_texColor, | |
| 38 | 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x7a, // (v_texcoord0.xyz | |
| 39 | 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x29, 0x29, 0x2e, 0x7a, 0x79, // + tmpvar_4)).zy | |
| 40 | 0x78, 0x77, 0x5b, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // xw[tmpvar_1];. | |
| 41 | 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // lowp float tmpva | |
| 42 | 0x72, 0x5f, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x20, // r_7;. tmpvar_7 | |
| 43 | 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // = (0.5 * (tmpvar | |
| 44 | 0x5f, 0x35, 0x20, 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, 0x29, 0x29, 0x3b, // _5 + tmpvar_6)); | |
| 45 | 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, // . highp float t | |
| 46 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_8;. tmpva | |
| 47 | 0x72, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x38, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x28, 0x73, 0x71, // r_8 = (8.0 * (sq | |
| 48 | 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, // rt(. dot (tmp | |
| 49 | 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, // var_2, tmpvar_2) | |
| 50 | 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, // . ) + sqrt(. | |
| 51 | 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2c, 0x20, // dot (tmpvar_3, | |
| 52 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x29, 0x3b, // tmpvar_3). ))); | |
| 53 | 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, // . lowp vec3 tmp | |
| 54 | 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // var_9;. tmpvar_ | |
| 55 | 0x39, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, // 9.x = tmpvar_5;. | |
| 56 | 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x74, // tmpvar_9.y = t | |
| 57 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_7;. tmpva | |
| 58 | 0x72, 0x5f, 0x39, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x36, // r_9.z = tmpvar_6 | |
| 59 | 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, // ;. lowp vec3 tm | |
| 60 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // pvar_10;. highp | |
| 61 | 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x31, 0x3b, // float edge0_11; | |
| 62 | 0x0a, 0x20, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x31, 0x20, 0x3d, 0x20, 0x28, 0x30, // . edge0_11 = (0 | |
| 63 | 0x2e, 0x35, 0x20, 0x2d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x29, 0x3b, 0x0a, // .5 - tmpvar_8);. | |
| 64 | 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, // lowp vec3 tmpv | |
| 65 | 0x61, 0x72, 0x5f, 0x31, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ar_12;. tmpvar_ | |
| 66 | 0x31, 0x32, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x74, 0x6d, // 12 = clamp (((tm | |
| 67 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x2d, 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, // pvar_9 - edge0_1 | |
| 68 | 0x31, 0x29, 0x20, 0x2f, 0x20, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x30, 0x2e, 0x35, 0x20, // 1) / (. (0.5 | |
| 69 | 0x2b, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2d, // + tmpvar_8). - | |
| 70 | 0x20, 0x65, 0x64, 0x67, 0x65, 0x30, 0x5f, 0x31, 0x31, 0x29, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, // edge0_11)), 0.0 | |
| 71 | 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // , 1.0);. tmpvar | |
| 72 | 0x5f, 0x31, 0x30, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, // _10 = (tmpvar_12 | |
| 73 | 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x20, 0x2a, 0x20, // * (tmpvar_12 * | |
| 74 | 0x28, 0x33, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x32, 0x2e, 0x30, // (3.0 - . (2.0 | |
| 75 | 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x29, 0x0a, 0x20, 0x20, // * tmpvar_12). | |
| 76 | 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, // )));. gl_FragCo | |
| 77 | 0x6c, 0x6f, 0x72, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, // lor.xyz = (tmpva | |
| 78 | 0x72, 0x5f, 0x31, 0x30, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, // r_10 * v_color0. | |
| 79 | 0x77, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // w);. gl_FragCol | |
| 80 | 0x6f, 0x72, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, // or.w = (tmpvar_7 | |
| 81 | 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x3b, 0x0a, // * v_color0.w);. | |
| 82 | 0x7d, 0x0a, 0x0a, 0x00, // }... | |
| 82 | 83 | }; |
| 83 | 84 | static const uint8_t fs_font_distance_field_subpixel_dx9[885] = |
| 84 | 85 | { |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_imgui_cubemap_glsl[ | |
| 1 | static const uint8_t fs_imgui_cubemap_glsl[578] = | |
| 2 | 2 | { |
| 3 | 0x46, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima | |
| 4 | 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled.... | |
| 5 | 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... | |
| 6 | 0x00, 0x01, 0x00, 0x33, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...3...varying h | |
| 7 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // ighp vec3 v_norm | |
| 8 | 0x61, 0x6c, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, // al;.uniform high | |
| 9 | 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // p vec4 u_imageLo | |
| 10 | 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, // dEnabled;.unifor | |
| 11 | 0x6d, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, // m lowp samplerCu | |
| 12 | 0x62, 0x65, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, // be s_texColor;.v | |
| 13 | 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{. | |
| 14 | 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // lowp vec4 tmpvar | |
| 15 | 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // _1;. tmpvar_1.x | |
| 16 | 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, // yz = textureCube | |
| 17 | 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // Lod (s_texCol | |
| 18 | 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x2c, 0x20, 0x75, 0x5f, // or, v_normal, u_ | |
| 19 | 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, // imageLodEnabled. | |
| 20 | 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // x).xyz;. tmpvar | |
| 21 | 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, // _1.w = (0.2 + (0 | |
| 22 | 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, // .8 * u_imageLodE | |
| 23 | 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // nabled.y));. gl | |
| 24 | 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp | |
| 25 | 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_1;.}... | |
| 3 | 0x46, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x00, 0x00, 0x33, 0x02, 0x00, 0x00, 0x6c, 0x6f, // FSH....e..3...lo | |
| 4 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, // wp vec4 impl_low | |
| 5 | 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x20, // _textureCubeLod | |
| 6 | 0x20, 0x20, 0x28, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // (lowp samplerC | |
| 7 | 0x75, 0x62, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x68, 0x69, 0x67, // ube sampler, hig | |
| 8 | 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6d, // hp vec3 coord, m | |
| 9 | 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x64, // ediump float lod | |
| 10 | 0x29, 0x0a, 0x7b, 0x0a, 0x23, 0x69, 0x66, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x28, // ).{.#if defined( | |
| 11 | 0x47, 0x4c, 0x5f, 0x45, 0x58, 0x54, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, // GL_EXT_shader_te | |
| 12 | 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x6f, 0x64, 0x29, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, // xture_lod)..retu | |
| 13 | 0x72, 0x6e, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, // rn textureCubeLo | |
| 14 | 0x64, 0x20, 0x20, 0x20, 0x28, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, // d (sampler, co | |
| 15 | 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6c, 0x73, 0x65, // ord, lod);.#else | |
| 16 | 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // ..return texture | |
| 17 | 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, // Cube(sampler, co | |
| 18 | 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6e, 0x64, 0x69, // ord, lod);.#endi | |
| 19 | 0x66, 0x0a, 0x7d, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, // f.}..varying hig | |
| 20 | 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, // hp vec3 v_normal | |
| 21 | 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ;.uniform highp | |
| 22 | 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, // vec4 u_imageLodE | |
| 23 | 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // nabled;.uniform | |
| 24 | 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, // lowp samplerCube | |
| 25 | 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // s_texColor;.voi | |
| 26 | 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, // d main ().{. lo | |
| 27 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // wp vec4 tmpvar_1 | |
| 28 | 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, // ;. tmpvar_1.xyz | |
| 29 | 0x20, 0x3d, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x78, 0x74, // = impl_low_text | |
| 30 | 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, // ureCubeLod (s | |
| 31 | 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x6e, 0x6f, 0x72, // _texColor, v_nor | |
| 32 | 0x6d, 0x61, 0x6c, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, // mal, u_imageLodE | |
| 33 | 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, // nabled.x).xyz;. | |
| 34 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, // tmpvar_1.w = (0 | |
| 35 | 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, // .2 + (0.8 * u_im | |
| 36 | 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, // ageLodEnabled.y) | |
| 37 | 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // );. gl_FragColo | |
| 38 | 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_1;.}. | |
| 39 | 0x0a, 0x00, // .. | |
| 26 | 40 | }; |
| 27 | 41 | static const uint8_t fs_imgui_cubemap_dx9[373] = |
| 28 | 42 | { |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_imgui_image_glsl[ | |
| 1 | static const uint8_t fs_imgui_image_glsl[567] = | |
| 2 | 2 | { |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima | |
| 4 | 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled.... | |
| 5 | 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... | |
| 6 | 0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...0...varying h | |
| 7 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc | |
| 8 | 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, // oord0;.uniform h | |
| 9 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // ighp vec4 u_imag | |
| 10 | 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // eLodEnabled;.uni | |
| 11 | 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, // form sampler2D s | |
| 12 | 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // _texColor;.void | |
| 13 | 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, // main ().{. lowp | |
| 14 | 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // vec4 tmpvar_1;. | |
| 15 | 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, // tmpvar_1.xyz = | |
| 16 | 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, // texture2DLod | |
| 17 | 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, // (s_texColor, v_ | |
| 18 | 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, // texcoord0, u_ima | |
| 19 | 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, // geLodEnabled.x). | |
| 20 | 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // xyz;. tmpvar_1. | |
| 21 | 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, // w = (0.2 + (0.8 | |
| 22 | 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, // * u_imageLodEnab | |
| 23 | 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // led.y));. gl_Fr | |
| 24 | 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar | |
| 25 | 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _1;.}... | |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, 0x6c, 0x6f, // FSH.o.><..(...lo | |
| 4 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, // wp vec4 impl_low | |
| 5 | 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, // _texture2DLod | |
| 6 | 0x28, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, // (lowp sampler2D | |
| 7 | 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // sampler, highp v | |
| 8 | 0x65, 0x63, 0x32, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, // ec2 coord, mediu | |
| 9 | 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x64, 0x29, 0x0a, 0x7b, 0x0a, // mp float lod).{. | |
| 10 | 0x23, 0x69, 0x66, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x28, 0x47, 0x4c, 0x5f, 0x45, // #if defined(GL_E | |
| 11 | 0x58, 0x54, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // XT_shader_textur | |
| 12 | 0x65, 0x5f, 0x6c, 0x6f, 0x64, 0x29, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, // e_lod)..return t | |
| 13 | 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x28, 0x73, // exture2DLod (s | |
| 14 | 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, // ampler, coord, l | |
| 15 | 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, // od);.#else..retu | |
| 16 | 0x72, 0x6e, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x73, 0x61, 0x6d, // rn texture2D(sam | |
| 17 | 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, 0x6f, 0x64, // pler, coord, lod | |
| 18 | 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x0a, 0x7d, 0x0a, 0x0a, 0x76, 0x61, 0x72, // );.#endif.}..var | |
| 19 | 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, // ying highp vec2 | |
| 20 | 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // v_texcoord0;.uni | |
| 21 | 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // form highp vec4 | |
| 22 | 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, // u_imageLodEnable | |
| 23 | 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, // d;.uniform sampl | |
| 24 | 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, // er2D s_texColor; | |
| 25 | 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. | |
| 26 | 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // lowp vec4 tmpv | |
| 27 | 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // ar_1;. tmpvar_1 | |
| 28 | 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, // .xyz = impl_low_ | |
| 29 | 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, // texture2DLod | |
| 30 | 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, // (s_texColor, v_t | |
| 31 | 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // excoord0, u_imag | |
| 32 | 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, // eLodEnabled.x).x | |
| 33 | 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, // yz;. tmpvar_1.w | |
| 34 | 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, // = (0.2 + (0.8 * | |
| 35 | 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, // u_imageLodEnabl | |
| 36 | 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // ed.y));. gl_Fra | |
| 37 | 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // gColor = tmpvar_ | |
| 38 | 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 1;.}... | |
| 26 | 39 | }; |
| 27 | 40 | static const uint8_t fs_imgui_image_dx9[377] = |
| 28 | 41 | { |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_imgui_image_swizz_glsl[ | |
| 1 | static const uint8_t fs_imgui_image_swizz_glsl[616] = | |
| 2 | 2 | { |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima | |
| 4 | 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled.... | |
| 5 | 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x07, 0x01, 0x00, 0x00, // ...u_swizzle.... | |
| 6 | 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... | |
| 7 | 0x00, 0x01, 0x00, 0x61, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...a...varying h | |
| 8 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc | |
| 9 | 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, // oord0;.uniform h | |
| 10 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // ighp vec4 u_imag | |
| 11 | 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // eLodEnabled;.uni | |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x59, 0x02, 0x00, 0x00, 0x6c, 0x6f, // FSH.o.><..Y...lo | |
| 4 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, // wp vec4 impl_low | |
| 5 | 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, // _texture2DLod | |
| 6 | 0x28, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, // (lowp sampler2D | |
| 7 | 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // sampler, highp v | |
| 8 | 0x65, 0x63, 0x32, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, // ec2 coord, mediu | |
| 9 | 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x64, 0x29, 0x0a, 0x7b, 0x0a, // mp float lod).{. | |
| 10 | 0x23, 0x69, 0x66, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x28, 0x47, 0x4c, 0x5f, 0x45, // #if defined(GL_E | |
| 11 | 0x58, 0x54, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // XT_shader_textur | |
| 12 | 0x65, 0x5f, 0x6c, 0x6f, 0x64, 0x29, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, // e_lod)..return t | |
| 13 | 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x28, 0x73, // exture2DLod (s | |
| 14 | 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, // ampler, coord, l | |
| 15 | 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, // od);.#else..retu | |
| 16 | 0x72, 0x6e, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x73, 0x61, 0x6d, // rn texture2D(sam | |
| 17 | 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, 0x6f, 0x64, // pler, coord, lod | |
| 18 | 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x0a, 0x7d, 0x0a, 0x0a, 0x76, 0x61, 0x72, // );.#endif.}..var | |
| 19 | 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, // ying highp vec2 | |
| 20 | 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // v_texcoord0;.uni | |
| 12 | 21 | 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // form highp vec4 |
| 13 | 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // u_swizzle;.unifo | |
| 14 | 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, // rm sampler2D s_t | |
| 15 | 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // exColor;.void ma | |
| 16 | 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, // in ().{. lowp v | |
| 17 | 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_1;. | |
| 18 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, // tmpvar_1.xyz = v | |
| 19 | 0x65, 0x63, 0x33, 0x28, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // ec3(dot (texture | |
| 20 | 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // 2DLod (s_texC | |
| 21 | 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // olor, v_texcoord | |
| 22 | 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // 0, u_imageLodEna | |
| 23 | 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2c, 0x20, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, // bled.x), u_swizz | |
| 24 | 0x6c, 0x65, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // le));. tmpvar_1 | |
| 25 | 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, // .w = (0.2 + (0.8 | |
| 26 | 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // * u_imageLodEna | |
| 27 | 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // bled.y));. gl_F | |
| 28 | 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva | |
| 29 | 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_1;.}... | |
| 22 | 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, // u_imageLodEnable | |
| 23 | 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // d;.uniform highp | |
| 24 | 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x3b, // vec4 u_swizzle; | |
| 25 | 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // .uniform sampler | |
| 26 | 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, // 2D s_texColor;.v | |
| 27 | 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{. | |
| 28 | 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // lowp vec4 tmpvar | |
| 29 | 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // _1;. tmpvar_1.x | |
| 30 | 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x69, // yz = vec3(dot (i | |
| 31 | 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, // mpl_low_texture2 | |
| 32 | 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // DLod (s_texCo | |
| 33 | 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // lor, v_texcoord0 | |
| 34 | 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, // , u_imageLodEnab | |
| 35 | 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2c, 0x20, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, // led.x), u_swizzl | |
| 36 | 0x65, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // e));. tmpvar_1. | |
| 37 | 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, // w = (0.2 + (0.8 | |
| 38 | 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, // * u_imageLodEnab | |
| 39 | 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // led.y));. gl_Fr | |
| 40 | 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar | |
| 41 | 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _1;.}... | |
| 30 | 42 | }; |
| 31 | 43 | static const uint8_t fs_imgui_image_swizz_dx9[441] = |
| 32 | 44 | { |
| r245594 | r245595 | |
|---|---|---|
| 1 | static const uint8_t fs_imgui_latlong_glsl[6 | |
| 1 | static const uint8_t fs_imgui_latlong_glsl[866] = | |
| 2 | 2 | { |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima | |
| 4 | 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled.... | |
| 5 | 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... | |
| 6 | 0x00, 0x01, 0x00, 0x51, 0x02, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...Q...varying h | |
| 7 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc | |
| 8 | 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, // oord0;.uniform h | |
| 9 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // ighp vec4 u_imag | |
| 10 | 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // eLodEnabled;.uni | |
| 11 | 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // form lowp sample | |
| 12 | 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // rCube s_texColor | |
| 13 | 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, // ;.void main ().{ | |
| 14 | 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x72, 0x65, // . highp vec3 re | |
| 15 | 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // sult_1;. highp | |
| 16 | 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, // float tmpvar_2;. | |
| 17 | 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, // tmpvar_2 = (v_ | |
| 18 | 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x36, 0x2e, // texcoord0.x * 6. | |
| 19 | 0x32, 0x38, 0x33, 0x31, 0x39, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // 28319);. highp | |
| 20 | 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, // float tmpvar_3;. | |
| 21 | 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, // tmpvar_3 = (v_ | |
| 22 | 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x33, 0x2e, // texcoord0.y * 3. | |
| 23 | 0x31, 0x34, 0x31, 0x35, 0x39, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, // 14159);. result | |
| 3 | 0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x53, 0x03, 0x00, 0x00, 0x6c, 0x6f, // FSH.o.><..S...lo | |
| 4 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, // wp vec4 impl_low | |
| 5 | 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x20, // _textureCubeLod | |
| 6 | 0x20, 0x20, 0x28, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // (lowp samplerC | |
| 7 | 0x75, 0x62, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x68, 0x69, 0x67, // ube sampler, hig | |
| 8 | 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6d, // hp vec3 coord, m | |
| 9 | 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x64, // ediump float lod | |
| 10 | 0x29, 0x0a, 0x7b, 0x0a, 0x23, 0x69, 0x66, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x28, // ).{.#if defined( | |
| 11 | 0x47, 0x4c, 0x5f, 0x45, 0x58, 0x54, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x65, // GL_EXT_shader_te | |
| 12 | 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x6c, 0x6f, 0x64, 0x29, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, // xture_lod)..retu | |
| 13 | 0x72, 0x6e, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, // rn textureCubeLo | |
| 14 | 0x64, 0x20, 0x20, 0x20, 0x28, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, // d (sampler, co | |
| 15 | 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6c, 0x73, 0x65, // ord, lod);.#else | |
| 16 | 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // ..return texture | |
| 17 | 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6f, // Cube(sampler, co | |
| 18 | 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x6c, 0x6f, 0x64, 0x29, 0x3b, 0x0a, 0x23, 0x65, 0x6e, 0x64, 0x69, // ord, lod);.#endi | |
| 19 | 0x66, 0x0a, 0x7d, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, // f.}..varying hig | |
| 20 | 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // hp vec2 v_texcoo | |
| 21 | 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, // rd0;.uniform hig | |
| 22 | 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, // hp vec4 u_imageL | |
| 23 | 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // odEnabled;.unifo | |
| 24 | 0x72, 0x6d, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // rm lowp samplerC | |
| 25 | 0x75, 0x62, 0x65, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, // ube s_texColor;. | |
| 26 | 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, // void main ().{. | |
| 27 | 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x72, 0x65, 0x73, 0x75, // highp vec3 resu | |
| 28 | 0x6c, 0x74, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, // lt_1;. highp fl | |
| 29 | 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, // oat tmpvar_2;. | |
| 30 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, 0x74, 0x65, // tmpvar_2 = (v_te | |
| 31 | 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x36, 0x2e, 0x32, 0x38, // xcoord0.x * 6.28 | |
| 32 | 0x33, 0x31, 0x38, 0x35, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, // 3185);. highp f | |
| 33 | 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, // loat tmpvar_3;. | |
| 34 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x5f, 0x74, // tmpvar_3 = (v_t | |
| 35 | 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x79, 0x20, 0x2a, 0x20, 0x33, 0x2e, 0x31, // excoord0.y * 3.1 | |
| 36 | 0x34, 0x31, 0x35, 0x39, 0x33, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, // 41593);. result | |
| 24 | 37 | 0x5f, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x2d, 0x28, 0x73, 0x69, 0x6e, 0x28, 0x74, 0x6d, // _1.x = (-(sin(tm |
| 25 | 38 | 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x73, 0x69, 0x6e, 0x28, 0x74, // pvar_3)) * sin(t |
| 26 | 39 | 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, // mpvar_2));. res |
| r245594 | r245595 | |
| 31 | 44 | 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, // tmpvar_2));. lo |
| 32 | 45 | 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, // wp vec4 tmpvar_4 |
| 33 | 46 | 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x79, 0x7a, // ;. tmpvar_4.xyz |
| 34 | 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, // = textureCubeLo | |
| 35 | 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // d (s_texColor | |
| 36 | 0x2c, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x31, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, // , result_1, u_im | |
| 37 | 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, // ageLodEnabled.x) | |
| 38 | 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, // .xyz;. tmpvar_4 | |
| 39 | 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, // .w = (0.2 + (0.8 | |
| 40 | 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // * u_imageLodEna | |
| 41 | 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // bled.y));. gl_F | |
| 42 | 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva | |
| 43 | 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_4;.}... | |
| 47 | 0x20, 0x3d, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x78, 0x74, // = impl_low_text | |
| 48 | 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, // ureCubeLod (s | |
| 49 | 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, // _texColor, resul | |
| 50 | 0x74, 0x5f, 0x31, 0x2c, 0x20, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, // t_1, u_imageLodE | |
| 51 | 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, // nabled.x).xyz;. | |
| 52 | 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x30, // tmpvar_4.w = (0 | |
| 53 | 0x2e, 0x32, 0x20, 0x2b, 0x20, 0x28, 0x30, 0x2e, 0x38, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x69, 0x6d, // .2 + (0.8 * u_im | |
| 54 | 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2e, 0x79, 0x29, // ageLodEnabled.y) | |
| 55 | 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // );. gl_FragColo | |
| 56 | 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_4;.}. | |
| 57 | 0x0a, 0x00, // .. | |
| 44 | 58 | }; |
| 45 | 59 | static const uint8_t fs_imgui_latlong_dx9[537] = |
| 46 | 60 | { |
| r245594 | r245595 | |
|---|---|---|
| 456 | 456 | } |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | return bgfx::createTexture2D(_width, _height, 0, bgfx::TextureFormat::BGRA8, 0, mem); | |
| 459 | return bgfx::createTexture2D(uint16_t(_width), uint16_t(_height), 0, bgfx::TextureFormat::BGRA8, 0, mem); | |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | ImguiFontHandle create(const void* _data, uint32_t _size, float _fontSize) |
| r245594 | r245595 | |
| 910 | 910 | Area& area = getCurrentArea(); |
| 911 | 911 | |
| 912 | 912 | const uint16_t parentBottom = parentArea.m_scissorY + parentArea.m_scissorHeight; |
| 913 | const uint16_t childBottom = parentArea.m_widgetY + _height; | |
| 913 | const uint16_t childBottom = parentArea.m_widgetY + _height; | |
| 914 | 914 | const uint16_t bottom = IMGUI_MIN(childBottom, parentBottom); |
| 915 | 915 | |
| 916 | 916 | const uint16_t top = IMGUI_MAX(parentArea.m_widgetY, parentArea.m_scissorY); |
| r245594 | r245595 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | include ../../../scripts/shader-embeded.mk |
| 7 | 7 | |
| 8 | droidsans.ttf.h: ../runtime/font/droidsans.ttf | |
| 9 | bin2c -f $(<) -o $(@) -n s_droidSansTtf | |
| 8 | droidsans.ttf.h: ../../runtime/font/droidsans.ttf | |
| 9 | @bin2c -f $(<) -o $(@) -n s_droidSansTtf | |
| 10 | 10 | |
| 11 | 11 | rebuild: droidsans.ttf.h |
| 12 | 12 | @make -s --no-print-directory clean all |
| r245594 | r245595 | |
|---|---|---|
| 86 | 86 | ImGuiIO& io = ImGui::GetIO(); |
| 87 | 87 | io.DisplaySize = ImVec2(1280.0f, 720.0f); |
| 88 | 88 | io.DeltaTime = 1.0f / 60.0f; |
| 89 | io.IniFilename = NULL; | |
| 89 | 90 | // io.PixelCenterOffset = bgfx::RendererType::Direct3D9 == bgfx::getRendererType() ? -0.5f : 0.0f; |
| 90 | 91 | |
| 91 | 92 | const bgfx::Memory* vsmem; |
| r245594 | r245595 | |
|---|---|---|
| 10 | 10 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc |
| 11 | 11 | 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, // oord0;.uniform h |
| 12 | 12 | 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ighp mat4 u_mode |
| 13 | 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // lViewProj;.void | |
| 13 | 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // lViewProj;.void | |
| 14 | 14 | 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, // main ().{. high |
| 15 | 15 | 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // p vec4 tmpvar_1; |
| 16 | 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, // . tmpvar_1.w = | |
| 16 | 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, // . tmpvar_1.w = | |
| 17 | 17 | 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // 1.0;. tmpvar_1. |
| 18 | 18 | 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // xyz = a_position |
| 19 | 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, // ;. gl_Position | |
| 19 | 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, // ;. gl_Position | |
| 20 | 20 | 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, // = (u_modelViewPr |
| 21 | 21 | 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, // oj * tmpvar_1);. |
| 22 | 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, // v_texcoord0 = | |
| 22 | 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, // v_texcoord0 = | |
| 23 | 23 | 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // a_texcoord0;.}.. |
| 24 | 24 | 0x00, // . |
| 25 | 25 | }; |
| r245594 | r245595 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | BX_PRAGMA_DIAGNOSTIC_PUSH(); |
| 38 | 38 | BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers"); |
| 39 | BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow"); | |
| 39 | 40 | #define STB_IMAGE_IMPLEMENTATION |
| 40 | 41 | #include <stb/stb_image.c> |
| 41 | 42 | BX_PRAGMA_DIAGNOSTIC_POP(); |
| r245594 | r245595 | |
|---|---|---|
| 1 | 1 | FSH9Èâ |
| 2 | u_texColor u_texNormal u_lightPosRadius u_lightRgbInnerR | |
| 2 | u_texColor u_texNormal u_lightPosRadius u_lightRgbInnerR O varying highp vec3 v_bitangent; | |
| 3 | 3 | varying highp vec3 v_normal; |
| 4 | 4 | varying highp vec3 v_tangent; |
| 5 | 5 | varying highp vec2 v_texcoord0; |
| r245594 | r245595 | |
| 131 | 131 | gl_FragColor.xyz = (tmpvar_34 * tmpvar_33); |
| 132 | 132 | gl_FragColor.w = 1.0; |
| 133 | 133 | mediump vec4 tmpvar_35; |
| 134 | tmpvar_35.xyz = pow (abs(gl_FragColor.xyz), vec3(0.454545, 0.454545, 0.454545)); | |
| 134 | tmpvar_35.xyz = pow (abs(gl_FragColor.xyz), vec3(0.4545454, 0.4545454, 0.4545454)); | |
| 135 | 135 | tmpvar_35.w = gl_FragColor.w; |
| 136 | 136 | gl_FragColor = tmpvar_35; |
| 137 | 137 | } |
| r245594 | r245595 | |
|---|---|---|
| 1 | FSH£Üü | |
| 1 | FSH£Üü à varying highp vec4 v_color0; | |
| 2 | 2 | varying highp vec3 v_world; |
| 3 | 3 | void main () |
| 4 | 4 | { |
| r245594 | r245595 | |
| 14 | 14 | )).z, 0.0); |
| 15 | 15 | gl_FragColor = pow ((( |
| 16 | 16 | pow (v_color0, vec4(2.2, 2.2, 2.2, 2.2)) |
| 17 | * tmpvar_3) + pow (tmpvar_3, 30.0)), vec4(0.454545, 0.454545, 0.454545, 0.454545)); | |
| 17 | * tmpvar_3) + pow (tmpvar_3, 30.0)), vec4(0.4545454, 0.4545454, 0.4545454, 0.4545454)); | |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 |