├── .creator ├── asset-template │ └── typescript │ │ └── Custom Script Template Help Documentation.url └── default-meta.json ├── .gitignore ├── LICENSE ├── README.md ├── assets ├── materials.meta ├── materials │ ├── Chapter10.meta │ ├── Chapter10 │ │ ├── FresnelMat.mtl │ │ ├── FresnelMat.mtl.meta │ │ ├── GlassRefractionMat.mtl │ │ ├── GlassRefractionMat.mtl.meta │ │ ├── MirrorMat.mtl │ │ ├── MirrorMat.mtl.meta │ │ ├── ReflectionMat.mtl │ │ ├── ReflectionMat.mtl.meta │ │ ├── RefractionMat.mtl │ │ ├── RefractionMat.mtl.meta │ │ ├── SkyboxMat.mtl │ │ └── SkyboxMat.mtl.meta │ ├── Chapter11.meta │ ├── Chapter11 │ │ ├── BillboardMat.mtl │ │ ├── BillboardMat.mtl.meta │ │ ├── ImageSequenceAnimationMat.mtl │ │ ├── ImageSequenceAnimationMat.mtl.meta │ │ ├── ScrollingBackgroundMat.mtl │ │ ├── ScrollingBackgroundMat.mtl.meta │ │ ├── VertexAnimationWIthShadowMat.mtl │ │ ├── VertexAnimationWIthShadowMat.mtl.meta │ │ ├── WaterMat.mtl │ │ ├── WaterMat.mtl.meta │ │ ├── WaterMat1.mtl │ │ ├── WaterMat1.mtl.meta │ │ ├── WaterMat2.mtl │ │ └── WaterMat2.mtl.meta │ ├── Chapter12.meta │ ├── Chapter12 │ │ ├── Bloom-ExtractBrightMat.mtl │ │ ├── Bloom-ExtractBrightMat.mtl.meta │ │ ├── BloomMat-Bloom.mtl │ │ ├── BloomMat-Bloom.mtl.meta │ │ ├── BrightnessSaturationAndContrastMat.mtl │ │ ├── BrightnessSaturationAndContrastMat.mtl.meta │ │ ├── EdgeDetectionMat.mtl │ │ ├── EdgeDetectionMat.mtl.meta │ │ ├── GaussianBlurMat.mtl │ │ ├── GaussianBlurMat.mtl.meta │ │ ├── MotionBlurMat.mtl │ │ ├── MotionBlurMat.mtl.meta │ │ ├── MotionBlurMat2.mtl │ │ └── MotionBlurMat2.mtl.meta │ ├── Chapter5.meta │ ├── Chapter5 │ │ ├── SimpleShaderMat.mtl │ │ └── SimpleShaderMat.mtl.meta │ ├── Chapter6.meta │ ├── Chapter6 │ │ ├── BlinnPhongMat.mtl │ │ ├── BlinnPhongMat.mtl.meta │ │ ├── DiffusePixelLevelMat.mtl │ │ ├── DiffusePixelLevelMat.mtl.meta │ │ ├── DiffuseVertexLevelMat.mtl │ │ ├── DiffuseVertexLevelMat.mtl.meta │ │ ├── HalfLambertMat.mtl │ │ ├── HalfLambertMat.mtl.meta │ │ ├── SpecularPixelLevelMat.mtl │ │ ├── SpecularPixelLevelMat.mtl.meta │ │ ├── SpecularVertexLevelMat.mtl │ │ └── SpecularVertexLevelMat.mtl.meta │ ├── Chapter7.meta │ ├── Chapter7 │ │ ├── MaskTextureMat.mtl │ │ ├── MaskTextureMat.mtl.meta │ │ ├── NormalMapTangentSpaceMat.mtl │ │ ├── NormalMapTangentSpaceMat.mtl.meta │ │ ├── RampTextureMat.mtl │ │ ├── RampTextureMat.mtl.meta │ │ ├── SingleTextureMat.mtl │ │ ├── SingleTextureMat.mtl.meta │ │ ├── TextureMagnificationMat.mtl │ │ ├── TextureMagnificationMat.mtl.meta │ │ ├── TextureMinificationMat.mtl │ │ ├── TextureMinificationMat.mtl.meta │ │ ├── TextureWrapModeMat.mtl │ │ └── TextureWrapModeMat.mtl.meta │ ├── Chapter8.meta │ ├── Chapter8 │ │ ├── AlphaBlendBothSidedMat.mtl │ │ ├── AlphaBlendBothSidedMat.mtl.meta │ │ ├── AlphaBlendMat.mtl │ │ ├── AlphaBlendMat.mtl.meta │ │ ├── AlphaBlendZWriteMat.mtl │ │ ├── AlphaBlendZWriteMat.mtl.meta │ │ ├── AlphaTestBothSidedMat.mtl │ │ ├── AlphaTestBothSidedMat.mtl.meta │ │ ├── AlphaTestMat.mtl │ │ ├── AlphaTestMat.mtl.meta │ │ ├── BlendOperationsMat0.mtl │ │ ├── BlendOperationsMat0.mtl.meta │ │ ├── BlendOperationsMat1.mtl │ │ └── BlendOperationsMat1.mtl.meta │ ├── Chapter9.meta │ └── Chapter9 │ │ ├── AlphaTestWithShadowMat.mtl │ │ ├── AlphaTestWithShadowMat.mtl.meta │ │ ├── ForwardRenderingMat.mtl │ │ ├── ForwardRenderingMat.mtl.meta │ │ ├── ShadowMat-001.mtl │ │ ├── ShadowMat-001.mtl.meta │ │ ├── ShadowMat.mtl │ │ └── ShadowMat.mtl.meta ├── models.meta ├── models │ ├── Knot.FBX │ ├── Knot.FBX.meta │ ├── Teapot.FBX │ ├── Teapot.FBX.meta │ ├── suzanne.fbx │ ├── suzanne.fbx.meta │ ├── water_fall.fbx │ └── water_fall.fbx.meta ├── scenes.meta ├── scenes │ ├── Chapter10.meta │ ├── Chapter10 │ │ ├── Scene_10_1_1.scene │ │ ├── Scene_10_1_1.scene.meta │ │ ├── Scene_10_1_3.scene │ │ ├── Scene_10_1_3.scene.meta │ │ ├── Scene_10_1_4.scene │ │ ├── Scene_10_1_4.scene.meta │ │ ├── Scene_10_1_5.scene │ │ ├── Scene_10_1_5.scene.meta │ │ ├── Scene_10_2_1.scene │ │ ├── Scene_10_2_1.scene.meta │ │ ├── Scene_10_2_2.scene │ │ └── Scene_10_2_2.scene.meta │ ├── Chapter11.meta │ ├── Chapter11 │ │ ├── Scene_11_2_1.scene │ │ ├── Scene_11_2_1.scene.meta │ │ ├── Scene_11_2_2.scene │ │ ├── Scene_11_2_2.scene.meta │ │ ├── Scene_11_3_1.scene │ │ ├── Scene_11_3_1.scene.meta │ │ ├── Scene_11_3_2.scene │ │ ├── Scene_11_3_2.scene.meta │ │ ├── Scene_11_3_3.scene │ │ └── Scene_11_3_3.scene.meta │ ├── Chapter12.meta │ ├── Chapter12 │ │ ├── Scene_12_2.scene │ │ ├── Scene_12_2.scene.meta │ │ ├── Scene_12_3.scene │ │ ├── Scene_12_3.scene.meta │ │ ├── Scene_12_4.scene │ │ ├── Scene_12_4.scene.meta │ │ ├── Scene_12_5.scene │ │ ├── Scene_12_5.scene.meta │ │ ├── Scene_12_6.scene │ │ └── Scene_12_6.scene.meta │ ├── Chapter5.meta │ ├── Chapter5 │ │ ├── Scene_5.scene │ │ └── Scene_5.scene.meta │ ├── Chapter6.meta │ ├── Chapter6 │ │ ├── Scene_6_4.scene │ │ ├── Scene_6_4.scene.meta │ │ ├── Scene_6_5.scene │ │ └── Scene_6_5.scene.meta │ ├── Chapter7.meta │ ├── Chapter7 │ │ ├── Scene_7_1.scene │ │ ├── Scene_7_1.scene.meta │ │ ├── Scene_7_1_2_a.scene │ │ ├── Scene_7_1_2_a.scene.meta │ │ ├── Scene_7_1_2_b.scene │ │ ├── Scene_7_1_2_b.scene.meta │ │ ├── Scene_7_1_2_c.scene │ │ ├── Scene_7_1_2_c.scene.meta │ │ ├── Scene_7_2_3.scene │ │ ├── Scene_7_2_3.scene.meta │ │ ├── Scene_7_3.scene │ │ ├── Scene_7_3.scene.meta │ │ ├── Scene_7_4.scene │ │ └── Scene_7_4.scene.meta │ ├── Chapter8.meta │ ├── Chapter8 │ │ ├── Scene_8_3.scene │ │ ├── Scene_8_3.scene.meta │ │ ├── Scene_8_4.scene │ │ ├── Scene_8_4.scene.meta │ │ ├── Scene_8_5.scene │ │ ├── Scene_8_5.scene.meta │ │ ├── Scene_8_6.scene │ │ ├── Scene_8_6.scene.meta │ │ ├── Scene_8_7_1.scene │ │ ├── Scene_8_7_1.scene.meta │ │ ├── Scene_8_7_2.scene │ │ └── Scene_8_7_2.scene.meta │ ├── Chapter9.meta │ └── Chapter9 │ │ ├── Scene_9_2_2_1.scene │ │ ├── Scene_9_2_2_1.scene.meta │ │ ├── Scene_9_4_2.scene │ │ ├── Scene_9_4_2.scene.meta │ │ ├── Scene_9_4_5.scene │ │ └── Scene_9_4_5.scene.meta ├── scripts.meta ├── scripts │ ├── Chapter12.meta │ └── Chapter12 │ │ ├── MoveCube.ts │ │ ├── MoveCube.ts.meta │ │ ├── RotationCamera.ts │ │ └── RotationCamera.ts.meta ├── shaders.meta ├── shaders │ ├── Chapter10.meta │ ├── Chapter10 │ │ ├── Chapter10-Fresnel.effect │ │ ├── Chapter10-Fresnel.effect.meta │ │ ├── Chapter10-GlassRefraction.effect │ │ ├── Chapter10-GlassRefraction.effect.meta │ │ ├── Chapter10-Mirror.effect │ │ ├── Chapter10-Mirror.effect.meta │ │ ├── Chapter10-Reflection.effect │ │ ├── Chapter10-Reflection.effect.meta │ │ ├── Chapter10-Refraction.effect │ │ └── Chapter10-Refraction.effect.meta │ ├── Chapter11.meta │ ├── Chapter11 │ │ ├── Chapter11-Billboard.effect │ │ ├── Chapter11-Billboard.effect.meta │ │ ├── Chapter11-ImageSequenceAnimation.effect │ │ ├── Chapter11-ImageSequenceAnimation.effect.meta │ │ ├── Chapter11-ScrollingBackground.effect │ │ ├── Chapter11-ScrollingBackground.effect.meta │ │ ├── Chapter11-VertexAnimationWIthShadow.effect │ │ ├── Chapter11-VertexAnimationWIthShadow.effect.meta │ │ ├── Chapter11-Water.effect │ │ └── Chapter11-Water.effect.meta │ ├── Chapter12.meta │ ├── Chapter12 │ │ ├── Chapter12-Bloom-Bloom.effect │ │ ├── Chapter12-Bloom-Bloom.effect.meta │ │ ├── Chapter12-Bloom-ExtractBright.effect │ │ ├── Chapter12-Bloom-ExtractBright.effect.meta │ │ ├── Chapter12-BrightnessSaturationAndContrast.effect │ │ ├── Chapter12-BrightnessSaturationAndContrast.effect.meta │ │ ├── Chapter12-EdgeDetection.effect │ │ ├── Chapter12-EdgeDetection.effect.meta │ │ ├── Chapter12-GaussianBlur.effect │ │ ├── Chapter12-GaussianBlur.effect.meta │ │ ├── Chapter12-MotionBlur.effect │ │ ├── Chapter12-MotionBlur.effect.meta │ │ ├── Chapter12-MotionBlur2.effect │ │ └── Chapter12-MotionBlur2.effect.meta │ ├── Chapter5.meta │ ├── Chapter5 │ │ ├── Chapter5-SimpleShader.effect │ │ └── Chapter5-SimpleShader.effect.meta │ ├── Chapter6.meta │ ├── Chapter6 │ │ ├── Chapter6-BlinnPhong.effect │ │ ├── Chapter6-BlinnPhong.effect.meta │ │ ├── Chapter6-DiffusePixelLevel.effect │ │ ├── Chapter6-DiffusePixelLevel.effect.meta │ │ ├── Chapter6-DiffuseVertexLevel.effect │ │ ├── Chapter6-DiffuseVertexLevel.effect.meta │ │ ├── Chapter6-HalfLambert.effect │ │ ├── Chapter6-HalfLambert.effect.meta │ │ ├── Chapter6-SpecularPixelLevel.effect │ │ ├── Chapter6-SpecularPixelLevel.effect.meta │ │ ├── Chapter6-SpecularVertexLevel.effect │ │ └── Chapter6-SpecularVertexLevel.effect.meta │ ├── Chapter7.meta │ ├── Chapter7 │ │ ├── Chapter7-MaskTexture.effect │ │ ├── Chapter7-MaskTexture.effect.meta │ │ ├── Chapter7-NormalMapTangentSpace.effect │ │ ├── Chapter7-NormalMapTangentSpace.effect.meta │ │ ├── Chapter7-RampTexture.effect │ │ ├── Chapter7-RampTexture.effect.meta │ │ ├── Chapter7-SingleTexture.effect │ │ ├── Chapter7-SingleTexture.effect.meta │ │ ├── Chapter7-TextureProperties.effect │ │ └── Chapter7-TextureProperties.effect.meta │ ├── Chapter8.meta │ ├── Chapter8 │ │ ├── Chapter8-AlphaBlend.effect │ │ ├── Chapter8-AlphaBlend.effect.meta │ │ ├── Chapter8-AlphaBlendBothSided.effect │ │ ├── Chapter8-AlphaBlendBothSided.effect.meta │ │ ├── Chapter8-AlphaBlendZWrite.effect │ │ ├── Chapter8-AlphaBlendZWrite.effect.meta │ │ ├── Chapter8-AlphaTest.effect │ │ ├── Chapter8-AlphaTest.effect.meta │ │ ├── Chapter8-AlphaTestBothSided.effect │ │ ├── Chapter8-AlphaTestBothSided.effect.meta │ │ ├── Chapter8-BlendOperations0.effect │ │ ├── Chapter8-BlendOperations0.effect.meta │ │ ├── Chapter8-BlendOperations1.effect │ │ └── Chapter8-BlendOperations1.effect.meta │ ├── Chapter9.meta │ ├── Chapter9 │ │ ├── Chapter9-AlphaTestWithShadow.effect │ │ ├── Chapter9-AlphaTestWithShadow.effect.meta │ │ ├── Chapter9-ForwardRendering.effect │ │ ├── Chapter9-ForwardRendering.effect.meta │ │ ├── Chapter9-Shadow.effect │ │ └── Chapter9-Shadow.effect.meta │ ├── cc-cg.chunk │ ├── cc-cg.chunk.meta │ ├── custom-common-function.chunk.meta │ ├── custom-function.chunk.meta │ ├── custom-function.effect.meta │ └── material.mtl.meta ├── textures.meta └── textures │ ├── Chapter10.meta │ ├── Chapter10 │ ├── Cubemap_0.cubemap │ ├── Cubemap_0.cubemap.meta │ ├── Cubemaps.meta │ ├── Cubemaps │ │ ├── negx.jpg │ │ ├── negx.jpg.meta │ │ ├── negy.jpg │ │ ├── negy.jpg.meta │ │ ├── negz.jpg │ │ ├── negz.jpg.meta │ │ ├── posx.jpg │ │ ├── posx.jpg.meta │ │ ├── posy.jpg │ │ ├── posy.jpg.meta │ │ ├── posz.jpg │ │ └── posz.jpg.meta │ ├── MirrorTexture.rt │ └── MirrorTexture.rt.meta │ ├── Chapter11.meta │ ├── Chapter11 │ ├── Flame_1.tga │ ├── Flame_1.tga.meta │ ├── boom.png │ ├── boom.png.meta │ ├── far_background.png │ ├── far_background.png.meta │ ├── flame_0.png │ ├── flame_0.png.meta │ ├── near_background.png │ ├── near_background.png.meta │ ├── star.png │ ├── star.png.meta │ ├── water.psd │ └── water.psd.meta │ ├── Chapter12.meta │ ├── Chapter12 │ ├── bloom-blur-rt.rt │ ├── bloom-blur-rt.rt.meta │ ├── bloom-original-rt.rt │ ├── bloom-original-rt.rt.meta │ ├── lotus0.jpg │ ├── lotus0.jpg.meta │ ├── lotus1.jpg │ ├── lotus1.jpg.meta │ ├── lotus2.jpg │ ├── lotus2.jpg.meta │ ├── render-texture.rt │ ├── render-texture.rt.meta │ ├── sakura0.jpg │ ├── sakura0.jpg.meta │ ├── sakura1.jpg │ ├── sakura1.jpg.meta │ ├── sakura2.jpg │ └── sakura2.jpg.meta │ ├── Chapter7.meta │ ├── Chapter7 │ ├── Block.JPG │ ├── Block.JPG.meta │ ├── Brick_Diffuse.JPG │ ├── Brick_Diffuse.JPG.meta │ ├── Brick_Normal.JPG │ ├── Brick_Normal.JPG.meta │ ├── Checkerboard.png │ ├── Checkerboard.png.meta │ ├── Floor.png │ ├── Floor.png.meta │ ├── Grid.png │ ├── Grid.png.meta │ ├── Ramp_Texture0.psd │ ├── Ramp_Texture0.psd.meta │ ├── Ramp_Texture1.psd │ ├── Ramp_Texture1.psd.meta │ ├── Ramp_Texture2.psd │ ├── Ramp_Texture2.psd.meta │ ├── Road_Diffuse.tga │ ├── Road_Diffuse.tga.meta │ ├── Road_Normal.tga │ ├── Road_Normal.tga.meta │ ├── Road_Specular.tga │ ├── Road_Specular.tga.meta │ ├── Wall_Diffuse.tga │ ├── Wall_Diffuse.tga.meta │ ├── Wall_Height.tga │ ├── Wall_Height.tga.meta │ ├── Wall_Normal.tga │ └── Wall_Normal.tga.meta │ ├── Chapter8.meta │ ├── Chapter8 │ ├── transparent_texture.psd │ └── transparent_texture.psd.meta │ ├── Objects.meta │ └── Objects │ ├── Box_Diffuse.png │ ├── Box_Diffuse.png.meta │ ├── Box_Normal.png │ ├── Box_Normal.png.meta │ ├── Sphere_Diffuse.JPG │ ├── Sphere_Diffuse.JPG.meta │ ├── Sphere_Normal.JPG │ └── Sphere_Normal.JPG.meta ├── package.json ├── settings └── v2 │ └── packages │ ├── builder.json │ ├── cocos-service.json │ ├── device.json │ ├── engine.json │ ├── information.json │ ├── program.json │ └── project.json └── tsconfig.json /.creator/asset-template/typescript/Custom Script Template Help Documentation.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template -------------------------------------------------------------------------------- /.creator/default-meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "texture": { 3 | "minfilter": "linear", 4 | "magfilter": "linear", 5 | "mipfilter": "nearest" 6 | }, 7 | "erp-texture-cube": { 8 | "minfilter": "linear", 9 | "magfilter": "linear", 10 | "mipfilter": "nearest" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | #/////////////////////////// 3 | # Cocos Creator 3D Project 4 | #/////////////////////////// 5 | library/ 6 | temp/ 7 | local/ 8 | build/ 9 | profiles/ 10 | native 11 | #////////////////////////// 12 | # NPM 13 | #////////////////////////// 14 | node_modules/ 15 | 16 | #////////////////////////// 17 | # VSCode 18 | #////////////////////////// 19 | .vscode/ 20 | 21 | #////////////////////////// 22 | # WebStorm 23 | #////////////////////////// 24 | .idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Lavender Ma 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CocosShaderBook 2 | Unity Shader Book 的cocos creator 3.8版本实现 3 | 4 | 5 | 《Unity Shader入门精要》For Cocos Creator 6 | 7 | ## 功能介绍 8 | - 这是一部配合《Unity Shader入门精要》学习的教程,全部用例采用Cocos Shader编写。 9 | - 充分利用了Cocos3.x与Unity在操作上的高度一致性,同学们可一边学习书中体系化的图形学知识,一边在cocos中进行实践。 10 | - 采用最新的Cocos Creator 3.8开发,本人会定期更新最新章节的用例。 11 | 12 | ## 使用教程 13 | - 下载源码后打开项目,然后按照《Unity Shader入门精要》这本书学习即可,所有用例与书中章节保持一致,用例在scenes文件夹中。 14 | 15 | ## 联系作者 16 | - QQ群 511105537 17 | - [Github地址](Github地址) 18 | - 欢迎各位大佬对用例中的错漏之处予以指正 19 | 20 | ## 版权声明 21 | 请勿用于商业用途。 22 | 23 | 24 | 25 | ## 更新声明 26 | - 0.9.1 27 | - 第11章 动画 28 | 纹理动画、顶点动画、广告牌、阴影动画 29 | 30 | - 第10章 高级纹理 31 | 环境贴图、环境反射、镜面反射、斯涅尔折射、菲涅尔折射 32 | 33 | - 第9章 更复杂的光照 34 | 阴影、多光源前向渲染 35 | 36 | - 0.9.0 37 | - 第8章 透明效果 38 | 透明度测试、透明度混合、深度写入半透明、双面透明 39 | 40 | - 第7章 基础纹理 41 | 单张纹理、凹凸映射、渐变纹理、遮罩纹理 42 | 43 | - 第6章 基础光照 44 | 漫反射(逐顶点、逐像素、半兰伯特模型)、高光(逐顶点、逐像素、Blinn-Phong) 45 | -------------------------------------------------------------------------------- /assets/materials.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "7b95c4c1-57e6-4075-a35e-a67434aae8bd", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter10.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "daee522c-7f98-4f86-803d-eda874d6aa80", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter10/FresnelMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "5eb411bc-fc96-48f3-b238-8fb877bac7ab", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | {} 28 | ] 29 | } -------------------------------------------------------------------------------- /assets/materials/Chapter10/FresnelMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "42753d3d-07f9-4311-8369-1fb69fc8be88", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter10/GlassRefractionMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "159708d2-1720-417c-ba78-7fd48569b45a", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | {} 28 | ] 29 | } -------------------------------------------------------------------------------- /assets/materials/Chapter10/GlassRefractionMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "48c062aa-44cb-43d5-95cb-0ef990fb963d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter10/MirrorMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "56026d7b-d312-44cb-a036-3385501b2933", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "4ed58fda-5ac9-4b4c-8a0e-b4d2cbb39202", 30 | "__expectedType__": "cc.RenderTexture" 31 | } 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /assets/materials/Chapter10/MirrorMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "541d8499-e170-433d-a505-e77a53bbfaea", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter10/ReflectionMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "996e8c25-7e3d-41b1-8c93-9022a032d822", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_ReflectAmount": 1 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /assets/materials/Chapter10/ReflectionMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "7d1c59a0-bec0-4f21-aaca-b7779218d6a2", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter10/RefractionMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "364fcf2f-95cd-4b3d-b3af-7e67735342ff", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_ReflectAmount": 0.9, 32 | "_RefractRatio": 0.5 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /assets/materials/Chapter10/RefractionMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "4ec75ad0-5cd2-4bf8-89c6-a3190cb1f831", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter10/SkyboxMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "511d2633-09a7-4bdd-ac42-f778032124b3", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {}, 14 | {} 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": {}, 20 | "blendState": { 21 | "targets": [ 22 | {} 23 | ] 24 | } 25 | }, 26 | { 27 | "rasterizerState": {}, 28 | "depthStencilState": {}, 29 | "blendState": { 30 | "targets": [ 31 | {} 32 | ] 33 | } 34 | } 35 | ], 36 | "_props": [ 37 | { 38 | "environmentMap": { 39 | "__uuid__": "077af038-c078-4e5e-b2cb-4c5d818e1a64", 40 | "__expectedType__": "cc.TextureCube" 41 | } 42 | }, 43 | {} 44 | ] 45 | } -------------------------------------------------------------------------------- /assets/materials/Chapter10/SkyboxMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "7049654e-bea6-4b6b-8fa8-4b83cd950389", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f4cc06ad-09e7-4de6-8c2a-710f2f26d070", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/BillboardMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "440ded64-6078-4e50-af62-d1b99e6ba0b6", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "e3a47558-2268-4bec-968f-24b63f41c086@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | } 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/BillboardMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "79419645-2717-4423-a29b-a5c31e3acff4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/ImageSequenceAnimationMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "18d374ef-7ca1-482c-8214-8c78389f3d71", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "bd3258f5-ebd8-48e7-8953-0759d54da48a@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_HorizontalAmount": 8, 33 | "_VerticalAmount": 8 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/ImageSequenceAnimationMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "ae8ea219-4231-4116-a29f-fe230d2eb91f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/ScrollingBackgroundMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "f7a03fb8-eaf0-4557-a225-ee0f6c97232a", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "710a0514-841b-4682-ae9f-772a046e67b4@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_DetailTex": { 33 | "__uuid__": "d264e60b-71cd-4e1e-b48d-14fe28c7991f@6c48a", 34 | "__expectedType__": "cc.Texture2D" 35 | }, 36 | "_ScrollX": 0.07, 37 | "_Scroll2X": 0.05 38 | } 39 | ] 40 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/ScrollingBackgroundMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "05fd30db-cc9e-452d-b8c3-4ec5411597ed", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/VertexAnimationWIthShadowMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "baaabeee-150d-4688-b647-6117c4661c89", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {}, 14 | {} 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": {}, 20 | "blendState": { 21 | "targets": [ 22 | {} 23 | ] 24 | } 25 | }, 26 | { 27 | "rasterizerState": {}, 28 | "depthStencilState": {}, 29 | "blendState": { 30 | "targets": [ 31 | {} 32 | ] 33 | } 34 | } 35 | ], 36 | "_props": [ 37 | { 38 | "_MainTex": { 39 | "__uuid__": "de790f27-d375-4490-ba80-64d49f0efdf9@6c48a", 40 | "__expectedType__": "cc.Texture2D" 41 | }, 42 | "_Magnitude": 0.06, 43 | "_Frequency": 5, 44 | "_InvWaveLength": 1.7, 45 | "_Speed": 0.4 46 | }, 47 | { 48 | "_Magnitude": 0.06, 49 | "_Frequency": 5, 50 | "_InvWaveLength": 1.7, 51 | "_Speed": 0.4 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/VertexAnimationWIthShadowMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "2447d4cf-7cff-4a4b-ba3f-5781e5a8d328", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/WaterMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "2dfe078f-5fa7-407c-9337-44555228efa0", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "de790f27-d375-4490-ba80-64d49f0efdf9@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_Color": { 33 | "__type__": "cc.Color", 34 | "r": 73, 35 | "g": 171, 36 | "b": 158, 37 | "a": 255 38 | }, 39 | "_Magnitude": 0.06, 40 | "_Frequency": 5, 41 | "_InvWaveLength": 4, 42 | "_Speed": 0.4 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/WaterMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "245372e8-60ff-47c5-a04f-0868c8a78ba4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/WaterMat1.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "2dfe078f-5fa7-407c-9337-44555228efa0", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "de790f27-d375-4490-ba80-64d49f0efdf9@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_Color": { 33 | "__type__": "cc.Color", 34 | "r": 176, 35 | "g": 240, 36 | "b": 232, 37 | "a": 255 38 | }, 39 | "_Magnitude": 0.05, 40 | "_Frequency": -4, 41 | "_InvWaveLength": 3.5, 42 | "_Speed": -0.35 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/WaterMat1.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "2b6c2957-dce8-4ccc-893b-3340c8292c7d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter11/WaterMat2.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "2dfe078f-5fa7-407c-9337-44555228efa0", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "de790f27-d375-4490-ba80-64d49f0efdf9@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_Magnitude": 0.04, 33 | "_Frequency": 2, 34 | "_InvWaveLength": 3, 35 | "_Speed": 0.3 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter11/WaterMat2.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "fff3c98c-62dd-4a5f-adcc-3fa7ee6e83ba", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "58cd1c85-d70a-4c95-89b1-12ffcd7a684f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/Bloom-ExtractBrightMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "34afdfed-96e7-4efa-83a1-4c4ecd151f28", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | {} 28 | ] 29 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/Bloom-ExtractBrightMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "7c1e9a5e-f11d-49bb-aa17-ba6cc4487dcf", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/BloomMat-Bloom.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "14463ecf-6bba-42ad-a1b8-7f5b89203c21", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_BlurTex": { 29 | "__uuid__": "9bb18040-826e-4a1a-a3c4-dc7a8903ecdc", 30 | "__expectedType__": "cc.RenderTexture" 31 | }, 32 | "_OriginalTex": { 33 | "__uuid__": "aa190d0a-8414-45c2-bc7c-c45b16edee0c", 34 | "__expectedType__": "cc.RenderTexture" 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/BloomMat-Bloom.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "a7d2fb88-5c5f-4f25-8919-456be8b7a306", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/BrightnessSaturationAndContrastMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "33e172f5-aab7-4a39-9d03-f0fd82f9f7c0", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Brightness": 1.2, 29 | "_Saturation": 1.2, 30 | "_Contrast": 1.2 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/BrightnessSaturationAndContrastMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "ba07d6b7-ab92-4972-b93e-835e7a57334e", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/EdgeDetectionMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "60055b3e-0b18-4901-9e14-8419b2445a3f", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_EdgeOnly": 0.3, 29 | "_EdgeColor": { 30 | "__type__": "cc.Color", 31 | "r": 0, 32 | "g": 0, 33 | "b": 0, 34 | "a": 255 35 | } 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/EdgeDetectionMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "e201c522-d2ea-497a-9067-7263a6a16126", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/GaussianBlurMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "8aad99a8-fdaf-4e05-8a3d-da560d0fffec", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_BlurSize": 2 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/GaussianBlurMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "42e3ba6f-2cb5-4c4b-831f-e44a18d79b1f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/MotionBlurMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "d152a00f-92e0-44cf-b67a-a913286a4da2", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_BlurAmount": 0.9, 29 | "_LastFrameRenderTexture": { 30 | "__uuid__": "2ecd2051-eeb8-44f2-ba3a-2d48d030a2ee", 31 | "__expectedType__": "cc.RenderTexture" 32 | } 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/MotionBlurMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "93f73ed6-8055-4717-a21b-9c8915eea067", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter12/MotionBlurMat2.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "346295c9-24d4-42f4-88c6-ea5c3a61b56b", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | {} 28 | ] 29 | } -------------------------------------------------------------------------------- /assets/materials/Chapter12/MotionBlurMat2.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "bf22ed47-854f-4ef5-bbde-eabb8bb9b3b8", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter5.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f90a7276-c735-44b8-9cbe-ceae5d2e808d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter5/SimpleShaderMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "ef9bfca3-6fb9-4c45-b9ac-5b4ac365f069", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | {} 28 | ] 29 | } -------------------------------------------------------------------------------- /assets/materials/Chapter5/SimpleShaderMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "b37c32e8-45aa-412d-ab9c-b8811acc3f5b", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter6.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "9d946492-84f1-4d8e-81b8-99ddb7bf44fd", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter6/BlinnPhongMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "b262778b-ea62-4748-8e13-4591fb4c6fb0", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Diffuse": { 29 | "__type__": "cc.Color", 30 | "r": 255, 31 | "g": 0, 32 | "b": 0, 33 | "a": 255 34 | }, 35 | "_Gloss": 8 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter6/BlinnPhongMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "38fc8f3a-07bf-48b5-89cb-211a39c8fd95", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter6/DiffusePixelLevelMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "99b1a307-c218-4640-8b0c-3e8aa23bf537", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Diffuse": { 29 | "__type__": "cc.Color", 30 | "r": 69, 31 | "g": 245, 32 | "b": 0, 33 | "a": 255 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /assets/materials/Chapter6/DiffusePixelLevelMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "5103e3f7-7f83-4fc2-85b7-1258067bd54c", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter6/DiffuseVertexLevelMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "1621641c-3f47-4508-ae80-597e61201dbc", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Diffuse": { 29 | "__type__": "cc.Color", 30 | "r": 255, 31 | "g": 0, 32 | "b": 0, 33 | "a": 255 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /assets/materials/Chapter6/DiffuseVertexLevelMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "f0c09984-3071-443d-aa47-bcc46c09efe2", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter6/HalfLambertMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "32e19f7c-b224-4cd9-8c22-e7fde83bae7f", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Diffuse": { 29 | "__type__": "cc.Color", 30 | "r": 0, 31 | "g": 143, 32 | "b": 255, 33 | "a": 255 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /assets/materials/Chapter6/HalfLambertMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "29f5cdfa-2561-433c-ba33-2e7d70dd6bea", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter6/SpecularPixelLevelMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "387289a1-6500-43fd-befa-13d4c5d7c182", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Diffuse": { 29 | "__type__": "cc.Color", 30 | "r": 131, 31 | "g": 252, 32 | "b": 0, 33 | "a": 255 34 | }, 35 | "_Gloss": 8 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter6/SpecularPixelLevelMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "e5ebc9cb-35c5-4507-9536-bc3125d7762f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter6/SpecularVertexLevelMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "cc736f04-d88f-42de-b5c8-e2d7a9e44fd6", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Diffuse": { 29 | "__type__": "cc.Color", 30 | "r": 0, 31 | "g": 201, 32 | "b": 252, 33 | "a": 255 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /assets/materials/Chapter6/SpecularVertexLevelMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "6d5c0830-01d5-4ffe-b651-f9482935c131", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter7.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "6c15391a-2db1-428a-9180-4ea95358f9a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/MaskTextureMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "cf0523c7-61bf-4ea9-a42b-428ab3ca98dd", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_MainTex": { 32 | "__uuid__": "cd8078ec-bc95-45af-a3db-736773e88a71@6c48a", 33 | "__expectedType__": "cc.Texture2D" 34 | }, 35 | "_BumpMap": { 36 | "__uuid__": "6a01d52b-8cc2-42fb-bf19-6a8acf801a05@3c318", 37 | "__expectedType__": "cc.Texture2D" 38 | }, 39 | "_SpecularMask": { 40 | "__uuid__": "e0938037-e46c-4f56-9c36-98905f6d9765@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "_Specular": { 44 | "__type__": "cc.Color", 45 | "r": 128, 46 | "g": 128, 47 | "b": 128, 48 | "a": 255 49 | }, 50 | "_Gloss": 8 51 | } 52 | ] 53 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/MaskTextureMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "3d5c7ece-5234-438c-bac8-08e06f6c9ee4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/NormalMapTangentSpaceMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "7e8eb9dd-635f-405e-928b-a5c52ffd72a1", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_MainTex": { 32 | "__uuid__": "9363aba0-160a-4947-a1ba-e4418899742c@6c48a", 33 | "__expectedType__": "cc.Texture2D" 34 | }, 35 | "_BumpMap": { 36 | "__uuid__": "6b58e39d-a165-47d5-8178-3aecd5cc5e73@3c318", 37 | "__expectedType__": "cc.Texture2D" 38 | }, 39 | "_BumpScale": -0.8, 40 | "_Gloss": 8 41 | } 42 | ] 43 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/NormalMapTangentSpaceMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "e35200bf-247c-465b-9662-d882a9f7d8ac", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/RampTextureMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "ab58feeb-4b5d-45d1-80ad-11d782f81330", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_Color": { 32 | "__type__": "cc.Color", 33 | "r": 218, 34 | "g": 190, 35 | "b": 190, 36 | "a": 255 37 | }, 38 | "_RampTex": { 39 | "__uuid__": "80e9a9af-8068-4fd0-adb8-0eb8cafee5f3@6c48a", 40 | "__expectedType__": "cc.Texture2D" 41 | }, 42 | "_RampTex_ST": { 43 | "__type__": "cc.Vec4", 44 | "x": 0, 45 | "y": 1, 46 | "z": 0, 47 | "w": 0 48 | }, 49 | "_Gloss": 120 50 | } 51 | ] 52 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/RampTextureMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "153a1229-85ef-4156-9c5b-a8c623966a78", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/SingleTextureMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "c02de083-63d9-47ad-9187-0ae0220bc22a", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Color": { 29 | "__type__": "cc.Color", 30 | "r": 243, 31 | "g": 206, 32 | "b": 206, 33 | "a": 255 34 | }, 35 | "_Specular": { 36 | "__type__": "cc.Color", 37 | "r": 0, 38 | "g": 0, 39 | "b": 0, 40 | "a": 255 41 | }, 42 | "_Gloss": 8, 43 | "_MainTex": { 44 | "__uuid__": "9363aba0-160a-4947-a1ba-e4418899742c@6c48a", 45 | "__expectedType__": "cc.Texture2D" 46 | } 47 | } 48 | ] 49 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/SingleTextureMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "0fc61bf5-3339-44ca-bf43-1d7b4dbe3879", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/TextureMagnificationMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "e5df3542-f83a-4434-9f18-8fe970eb07a5", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "8d48a781-f8b3-4bf9-a7fb-85d17b7c8764@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_TilingAndOffset": { 33 | "__type__": "cc.Vec4", 34 | "x": 2, 35 | "y": 2, 36 | "z": 0, 37 | "w": 0 38 | } 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/TextureMagnificationMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "249db5ed-ea67-4a17-b3f1-f57b9858bf0a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/TextureMinificationMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "e5df3542-f83a-4434-9f18-8fe970eb07a5", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "5ca54b02-afbc-41d3-adfc-4bb1377f4f71@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_TilingAndOffset": { 33 | "__type__": "cc.Vec4", 34 | "x": 30, 35 | "y": 30, 36 | "z": 0, 37 | "w": 0 38 | } 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/TextureMinificationMat.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"0fa5b782-a71c-4df8-a338-a4559a095a68","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/materials/Chapter7/TextureWrapModeMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "e5df3542-f83a-4434-9f18-8fe970eb07a5", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_MainTex": { 29 | "__uuid__": "b4599158-10fb-4438-bc62-45fdbee01d5e@6c48a", 30 | "__expectedType__": "cc.Texture2D" 31 | }, 32 | "_TilingAndOffset": { 33 | "__type__": "cc.Vec4", 34 | "x": 3, 35 | "y": 3, 36 | "z": 0, 37 | "w": 0 38 | } 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /assets/materials/Chapter7/TextureWrapModeMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "3d0a15e0-ee93-41f6-b4db-05694afa3461", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "01c5e2d7-fe8f-4789-a51e-17774bf349c0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaBlendBothSidedMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "0b5e453c-555b-4c94-a2af-f54e1784b72c", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | }, 17 | { 18 | "DIRECTIONAL_COOKIE": true, 19 | "DIRECTIONAL": true 20 | } 21 | ], 22 | "_states": [ 23 | { 24 | "rasterizerState": {}, 25 | "depthStencilState": {}, 26 | "blendState": { 27 | "targets": [ 28 | {} 29 | ] 30 | } 31 | }, 32 | { 33 | "rasterizerState": {}, 34 | "depthStencilState": {}, 35 | "blendState": { 36 | "targets": [ 37 | {} 38 | ] 39 | } 40 | } 41 | ], 42 | "_props": [ 43 | { 44 | "_MainTex": { 45 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 46 | "__expectedType__": "cc.Texture2D" 47 | }, 48 | "_AlphaScale": 0.5 49 | }, 50 | { 51 | "_MainTex": { 52 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 53 | "__expectedType__": "cc.Texture2D" 54 | }, 55 | "_AlphaScale": 0.5 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaBlendBothSidedMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "dd7fefa4-fd2d-49fe-af48-1814c445968b", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaBlendMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "8d42cb71-e873-4c91-a7dd-6241d54efa91", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_MainTex": { 32 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 33 | "__expectedType__": "cc.Texture2D" 34 | }, 35 | "_AlphaScale": 0.6 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaBlendMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "1635f65f-d9aa-4ed9-9f2c-f27b77aeaa12", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaBlendZWriteMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "8245982a-26ae-49c5-b631-773381f1acf0", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | }, 17 | {} 18 | ], 19 | "_states": [ 20 | { 21 | "rasterizerState": {}, 22 | "depthStencilState": {}, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | { 30 | "rasterizerState": {}, 31 | "depthStencilState": {}, 32 | "blendState": { 33 | "targets": [ 34 | {} 35 | ] 36 | } 37 | } 38 | ], 39 | "_props": [ 40 | {}, 41 | { 42 | "_AlphaScale": 0.7 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaBlendZWriteMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "9c5c1d2d-081a-44ed-ab50-cf0b23f1a540", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaTestBothSidedMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "3f8b52a1-dd18-4b5c-b19b-b5e21e628395", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_MainTex": { 32 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 33 | "__expectedType__": "cc.Texture2D" 34 | }, 35 | "_Cutoff": 0.6 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaTestBothSidedMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "b5d8831f-aa76-4daf-adf1-8e17064eb56e", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaTestMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "022e2353-38c8-45f8-bb1a-b1b3a92214de", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | } 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_MainTex": { 32 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 33 | "__expectedType__": "cc.Texture2D" 34 | }, 35 | "_Cutoff": 0.7 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/AlphaTestMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "3c706cc3-22bb-46f8-9529-64e860c8bd27", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/BlendOperationsMat0.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "b3a82d70-62b3-4898-a703-275a5dfc8416", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | {} 22 | ] 23 | } 24 | } 25 | ], 26 | "_props": [ 27 | { 28 | "_Color": { 29 | "__type__": "cc.Color", 30 | "r": 79, 31 | "g": 176, 32 | "b": 216, 33 | "a": 255 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/BlendOperationsMat0.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "9197137d-cd57-4117-b251-e19d87e898d0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter8/BlendOperationsMat1.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "a2bc2e47-8adf-46e5-b42e-7686e176ba9c", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {} 14 | ], 15 | "_states": [ 16 | { 17 | "rasterizerState": {}, 18 | "depthStencilState": {}, 19 | "blendState": { 20 | "targets": [ 21 | { 22 | "blendSrc": 2, 23 | "blendDst": 4 24 | } 25 | ] 26 | } 27 | } 28 | ], 29 | "_props": [ 30 | { 31 | "_Color": { 32 | "__type__": "cc.Color", 33 | "r": 216, 34 | "g": 141, 35 | "b": 108, 36 | "a": 255 37 | }, 38 | "_AlphaScale": 0.6 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /assets/materials/Chapter8/BlendOperationsMat1.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "1223a876-4165-4e54-82f0-aa27936820ce", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter9.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "16876e95-6c15-441a-bea4-cd3a47df280d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/materials/Chapter9/AlphaTestWithShadowMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "cbc5ea01-8481-40e0-a2ee-a57335d08392", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {}, 14 | {} 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": {}, 20 | "blendState": { 21 | "targets": [ 22 | {} 23 | ] 24 | } 25 | }, 26 | { 27 | "rasterizerState": {}, 28 | "depthStencilState": {}, 29 | "blendState": { 30 | "targets": [ 31 | {} 32 | ] 33 | } 34 | } 35 | ], 36 | "_props": [ 37 | { 38 | "_MainTex": { 39 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 40 | "__expectedType__": "cc.Texture2D" 41 | }, 42 | "_Cutoff": 0.7 43 | }, 44 | { 45 | "_MainTex": { 46 | "__uuid__": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 47 | "__expectedType__": "cc.Texture2D" 48 | }, 49 | "_Cutoff": 0.7 50 | } 51 | ] 52 | } -------------------------------------------------------------------------------- /assets/materials/Chapter9/AlphaTestWithShadowMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "acf16440-f9c3-4e09-88a4-cbc47627e31a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter9/ForwardRenderingMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "6eb3ea5b-584d-4df6-9ea8-90fc087474a7", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | {}, 14 | {} 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": {}, 20 | "blendState": { 21 | "targets": [ 22 | {} 23 | ] 24 | } 25 | }, 26 | { 27 | "rasterizerState": {}, 28 | "depthStencilState": {}, 29 | "blendState": { 30 | "targets": [ 31 | {} 32 | ] 33 | } 34 | } 35 | ], 36 | "_props": [ 37 | { 38 | "_Diffuse": { 39 | "__type__": "cc.Color", 40 | "r": 236, 41 | "g": 113, 42 | "b": 113, 43 | "a": 255 44 | }, 45 | "_Gloss": 8 46 | }, 47 | { 48 | "_LightTexture0": { 49 | "__uuid__": "70e97206-5d03-4c2d-af35-e8280f5321a3@6c48a", 50 | "__expectedType__": "cc.Texture2D" 51 | } 52 | } 53 | ] 54 | } -------------------------------------------------------------------------------- /assets/materials/Chapter9/ForwardRenderingMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "4ce89c7c-1caf-4a17-ae5c-fee50486f07b", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/materials/Chapter9/ShadowMat-001.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "78ba064a-7f36-49c4-bdda-84ac695b0b04", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true 16 | }, 17 | { 18 | "DIRECTIONAL_COOKIE": true, 19 | "DIRECTIONAL": true 20 | }, 21 | {} 22 | ], 23 | "_states": [ 24 | { 25 | "rasterizerState": {}, 26 | "depthStencilState": {}, 27 | "blendState": { 28 | "targets": [ 29 | {} 30 | ] 31 | } 32 | }, 33 | { 34 | "rasterizerState": {}, 35 | "depthStencilState": {}, 36 | "blendState": { 37 | "targets": [ 38 | {} 39 | ] 40 | } 41 | }, 42 | { 43 | "rasterizerState": {}, 44 | "depthStencilState": {}, 45 | "blendState": { 46 | "targets": [ 47 | {} 48 | ] 49 | } 50 | } 51 | ], 52 | "_props": [ 53 | { 54 | "_Diffuse": { 55 | "__type__": "cc.Color", 56 | "r": 243, 57 | "g": 44, 58 | "b": 44, 59 | "a": 255 60 | }, 61 | "_Gloss": 8 62 | }, 63 | {}, 64 | {} 65 | ] 66 | } -------------------------------------------------------------------------------- /assets/materials/Chapter9/ShadowMat-001.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"7c9f3c6b-b197-400f-aa45-9bd880d272b1","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/materials/Chapter9/ShadowMat.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "__editorExtras__": {}, 6 | "_native": "", 7 | "_effectAsset": { 8 | "__uuid__": "78ba064a-7f36-49c4-bdda-84ac695b0b04", 9 | "__expectedType__": "cc.EffectAsset" 10 | }, 11 | "_techIdx": 0, 12 | "_defines": [ 13 | { 14 | "DIRECTIONAL_COOKIE": true, 15 | "DIRECTIONAL": true, 16 | "CUSTOM_RECEIVE_SHADOW": 1 17 | }, 18 | { 19 | "DIRECTIONAL_COOKIE": true, 20 | "DIRECTIONAL": true 21 | }, 22 | {} 23 | ], 24 | "_states": [ 25 | { 26 | "rasterizerState": {}, 27 | "depthStencilState": {}, 28 | "blendState": { 29 | "targets": [ 30 | {} 31 | ] 32 | } 33 | }, 34 | { 35 | "rasterizerState": {}, 36 | "depthStencilState": {}, 37 | "blendState": { 38 | "targets": [ 39 | {} 40 | ] 41 | } 42 | }, 43 | { 44 | "rasterizerState": {}, 45 | "depthStencilState": {}, 46 | "blendState": { 47 | "targets": [ 48 | {} 49 | ] 50 | } 51 | } 52 | ], 53 | "_props": [ 54 | { 55 | "_Diffuse": { 56 | "__type__": "cc.Color", 57 | "r": 243, 58 | "g": 44, 59 | "b": 44, 60 | "a": 255 61 | }, 62 | "_Gloss": 8 63 | }, 64 | {}, 65 | {} 66 | ] 67 | } -------------------------------------------------------------------------------- /assets/materials/Chapter9/ShadowMat.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "7f4021f8-2bb4-43fa-a621-c199a12a1659", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/models.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "893286cc-68d2-4b97-88ff-2978fcdbdb39", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/models/Knot.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/models/Knot.FBX -------------------------------------------------------------------------------- /assets/models/Knot.FBX.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.3.8", 3 | "importer": "fbx", 4 | "imported": true, 5 | "uuid": "e10d73e9-03e4-43e3-ad34-9202bd78a31f", 6 | "files": [], 7 | "subMetas": { 8 | "c1183": { 9 | "importer": "gltf-mesh", 10 | "uuid": "e10d73e9-03e4-43e3-ad34-9202bd78a31f@c1183", 11 | "displayName": "", 12 | "id": "c1183", 13 | "name": "Torus Knot01.mesh", 14 | "userData": { 15 | "gltfIndex": 0, 16 | "triangleCount": 2880 17 | }, 18 | "ver": "1.1.1", 19 | "imported": true, 20 | "files": [ 21 | ".bin", 22 | ".json" 23 | ], 24 | "subMetas": {} 25 | }, 26 | "c011e": { 27 | "importer": "gltf-scene", 28 | "uuid": "e10d73e9-03e4-43e3-ad34-9202bd78a31f@c011e", 29 | "displayName": "", 30 | "id": "c011e", 31 | "name": "Knot.prefab", 32 | "userData": { 33 | "gltfIndex": 0 34 | }, 35 | "ver": "1.0.14", 36 | "imported": true, 37 | "files": [ 38 | ".json" 39 | ], 40 | "subMetas": {} 41 | } 42 | }, 43 | "userData": { 44 | "imageMetas": [], 45 | "fbx": { 46 | "smartMaterialEnabled": true 47 | }, 48 | "redirect": "e10d73e9-03e4-43e3-ad34-9202bd78a31f@c011e", 49 | "lods": { 50 | "enable": false, 51 | "hasBuiltinLOD": false, 52 | "options": [ 53 | { 54 | "screenRatio": 0.25, 55 | "faceCount": 1 56 | }, 57 | { 58 | "screenRatio": 0.125, 59 | "faceCount": 0.25 60 | }, 61 | { 62 | "screenRatio": 0.01, 63 | "faceCount": 0.1 64 | } 65 | ] 66 | }, 67 | "assetFinder": { 68 | "meshes": [ 69 | "e10d73e9-03e4-43e3-ad34-9202bd78a31f@c1183" 70 | ], 71 | "skeletons": [], 72 | "textures": [], 73 | "materials": [], 74 | "scenes": [ 75 | "e10d73e9-03e4-43e3-ad34-9202bd78a31f@c011e" 76 | ] 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /assets/models/Teapot.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/models/Teapot.FBX -------------------------------------------------------------------------------- /assets/models/Teapot.FBX.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.3.8", 3 | "importer": "fbx", 4 | "imported": true, 5 | "uuid": "f40f8b6a-6ba2-44fb-a4d9-b348b6f49a98", 6 | "files": [], 7 | "subMetas": { 8 | "bfd1e": { 9 | "importer": "gltf-mesh", 10 | "uuid": "f40f8b6a-6ba2-44fb-a4d9-b348b6f49a98@bfd1e", 11 | "displayName": "", 12 | "id": "bfd1e", 13 | "name": "Teapot01.mesh", 14 | "userData": { 15 | "gltfIndex": 0, 16 | "triangleCount": 576 17 | }, 18 | "ver": "1.1.1", 19 | "imported": true, 20 | "files": [ 21 | ".bin", 22 | ".json" 23 | ], 24 | "subMetas": {} 25 | }, 26 | "ddf7f": { 27 | "importer": "gltf-scene", 28 | "uuid": "f40f8b6a-6ba2-44fb-a4d9-b348b6f49a98@ddf7f", 29 | "displayName": "", 30 | "id": "ddf7f", 31 | "name": "Teapot.prefab", 32 | "userData": { 33 | "gltfIndex": 0 34 | }, 35 | "ver": "1.0.14", 36 | "imported": true, 37 | "files": [ 38 | ".json" 39 | ], 40 | "subMetas": {} 41 | } 42 | }, 43 | "userData": { 44 | "imageMetas": [], 45 | "fbx": { 46 | "smartMaterialEnabled": true 47 | }, 48 | "redirect": "f40f8b6a-6ba2-44fb-a4d9-b348b6f49a98@ddf7f", 49 | "lods": { 50 | "enable": false, 51 | "hasBuiltinLOD": false, 52 | "options": [ 53 | { 54 | "screenRatio": 0.25, 55 | "faceCount": 1 56 | }, 57 | { 58 | "screenRatio": 0.125, 59 | "faceCount": 0.25 60 | }, 61 | { 62 | "screenRatio": 0.01, 63 | "faceCount": 0.1 64 | } 65 | ] 66 | }, 67 | "assetFinder": { 68 | "meshes": [ 69 | "f40f8b6a-6ba2-44fb-a4d9-b348b6f49a98@bfd1e" 70 | ], 71 | "skeletons": [], 72 | "textures": [], 73 | "materials": [], 74 | "scenes": [ 75 | "f40f8b6a-6ba2-44fb-a4d9-b348b6f49a98@ddf7f" 76 | ] 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /assets/models/suzanne.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/models/suzanne.fbx -------------------------------------------------------------------------------- /assets/models/suzanne.fbx.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.3.8", 3 | "importer": "fbx", 4 | "imported": true, 5 | "uuid": "afd10fa5-74cd-4c0a-93ec-766e22c52ba6", 6 | "files": [], 7 | "subMetas": { 8 | "84800": { 9 | "importer": "gltf-scene", 10 | "uuid": "afd10fa5-74cd-4c0a-93ec-766e22c52ba6@84800", 11 | "displayName": "", 12 | "id": "84800", 13 | "name": "suzanne.prefab", 14 | "userData": { 15 | "gltfIndex": 0 16 | }, 17 | "ver": "1.0.14", 18 | "imported": true, 19 | "files": [ 20 | ".json" 21 | ], 22 | "subMetas": {} 23 | }, 24 | "bcca5": { 25 | "importer": "gltf-mesh", 26 | "uuid": "afd10fa5-74cd-4c0a-93ec-766e22c52ba6@bcca5", 27 | "displayName": "", 28 | "id": "bcca5", 29 | "name": "UnnamedMesh.mesh", 30 | "userData": { 31 | "gltfIndex": 0, 32 | "triangleCount": 15488 33 | }, 34 | "ver": "1.1.1", 35 | "imported": true, 36 | "files": [ 37 | ".bin", 38 | ".json" 39 | ], 40 | "subMetas": {} 41 | } 42 | }, 43 | "userData": { 44 | "imageMetas": [], 45 | "fbx": { 46 | "smartMaterialEnabled": true 47 | }, 48 | "redirect": "afd10fa5-74cd-4c0a-93ec-766e22c52ba6@84800", 49 | "lods": { 50 | "enable": false, 51 | "hasBuiltinLOD": false, 52 | "options": [ 53 | { 54 | "screenRatio": 0.25, 55 | "faceCount": 1 56 | }, 57 | { 58 | "screenRatio": 0.125, 59 | "faceCount": 0.25 60 | }, 61 | { 62 | "screenRatio": 0.01, 63 | "faceCount": 0.1 64 | } 65 | ] 66 | }, 67 | "assetFinder": { 68 | "meshes": [ 69 | "afd10fa5-74cd-4c0a-93ec-766e22c52ba6@bcca5" 70 | ], 71 | "skeletons": [], 72 | "textures": [], 73 | "materials": [], 74 | "scenes": [ 75 | "afd10fa5-74cd-4c0a-93ec-766e22c52ba6@84800" 76 | ] 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /assets/models/water_fall.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/models/water_fall.fbx -------------------------------------------------------------------------------- /assets/models/water_fall.fbx.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.3.8", 3 | "importer": "fbx", 4 | "imported": true, 5 | "uuid": "9c1e5648-b265-4b1a-98c7-1a111baa698e", 6 | "files": [], 7 | "subMetas": { 8 | "9a84c": { 9 | "importer": "gltf-mesh", 10 | "uuid": "9c1e5648-b265-4b1a-98c7-1a111baa698e@9a84c", 11 | "displayName": "", 12 | "id": "9a84c", 13 | "name": "平面.mesh", 14 | "userData": { 15 | "gltfIndex": 0, 16 | "triangleCount": 162 17 | }, 18 | "ver": "1.1.1", 19 | "imported": true, 20 | "files": [ 21 | ".bin", 22 | ".json" 23 | ], 24 | "subMetas": {} 25 | }, 26 | "d8c17": { 27 | "importer": "gltf-scene", 28 | "uuid": "9c1e5648-b265-4b1a-98c7-1a111baa698e@d8c17", 29 | "displayName": "", 30 | "id": "d8c17", 31 | "name": "water_fall.prefab", 32 | "userData": { 33 | "gltfIndex": 0 34 | }, 35 | "ver": "1.0.14", 36 | "imported": true, 37 | "files": [ 38 | ".json" 39 | ], 40 | "subMetas": {} 41 | } 42 | }, 43 | "userData": { 44 | "imageMetas": [], 45 | "fbx": { 46 | "smartMaterialEnabled": true 47 | }, 48 | "redirect": "9c1e5648-b265-4b1a-98c7-1a111baa698e@d8c17", 49 | "lods": { 50 | "enable": false, 51 | "hasBuiltinLOD": false, 52 | "options": [ 53 | { 54 | "screenRatio": 0.25, 55 | "faceCount": 1 56 | }, 57 | { 58 | "screenRatio": 0.125, 59 | "faceCount": 0.25 60 | }, 61 | { 62 | "screenRatio": 0.01, 63 | "faceCount": 0.1 64 | } 65 | ] 66 | }, 67 | "assetFinder": { 68 | "meshes": [ 69 | "9c1e5648-b265-4b1a-98c7-1a111baa698e@9a84c" 70 | ], 71 | "skeletons": [], 72 | "textures": [], 73 | "materials": [], 74 | "scenes": [ 75 | "9c1e5648-b265-4b1a-98c7-1a111baa698e@d8c17" 76 | ] 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /assets/scenes.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0a19d9c0-9339-4722-9132-f907c951e9b8", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "102f3efc-737f-49a4-ab67-f06b4e6da410", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10/Scene_10_1_1.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "a2a91cdf-db3f-4c42-a8c4-8dfb1c4bb042", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10/Scene_10_1_3.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "86754617-5fee-413b-bccc-8804dd7f1ff8", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10/Scene_10_1_4.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"527e13d6-f5e5-43ed-84aa-d6cad07080a8","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10/Scene_10_1_5.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"5def108b-1770-4bbb-af54-bb2a0961beab","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10/Scene_10_2_1.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "e501813c-78a0-4b84-ae41-91b80b3f16ce", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter10/Scene_10_2_2.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "eb082e68-1d0b-44ad-bd07-5b7f1c72b27c", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter11.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "3843e87e-bdc5-46fc-8bf6-f1a8eb7733c9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter11/Scene_11_2_1.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "3752970f-f0dd-404a-bb36-36b9ad123b73", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter11/Scene_11_2_2.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "7b94e2e2-9b34-4b7b-b078-40b694f056d9", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter11/Scene_11_3_1.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "48fa7836-ae6d-43fc-be7c-ba9d0c068280", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter11/Scene_11_3_2.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "044f138b-7205-48bf-abb5-b2ee4422703e", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter11/Scene_11_3_3.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "c9c8ee96-8aac-4c72-bce9-310de02c8eab", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter12.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "a41bc588-28e5-479b-9a43-a7948df62c60", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter12/Scene_12_2.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "0ada7f23-86a6-46c6-83e0-09cb4cc445f4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter12/Scene_12_3.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"2d6c5b04-b010-4a92-80ac-d6e07c24b13a","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter12/Scene_12_4.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"b0e2ca19-9466-4128-938b-896da44e7b29","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter12/Scene_12_5.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"16b089d6-59cd-4549-8d09-ab59cf9f41e8","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter12/Scene_12_6.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "707fbe62-ea52-4a8d-95a7-b77401d7c132", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter5.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "9703071e-9c2d-4e27-99c0-e4bcf21d594c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter5/Scene_5.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "46ec9bbb-cee6-4e19-bc48-9c45fa71958b", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter6.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "057041ab-e4ea-42d3-836e-8d9a27035cf5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter6/Scene_6_4.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "36794f43-ccbb-45bc-b1b9-854eed3a2b4b", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter6/Scene_6_5.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "641a527c-1a90-470a-8873-b2715207eab4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "221f6db8-e4f5-4d18-8f21-cafc05fddcde", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_1.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "fb9c9fe7-3c02-4422-b92f-763b71f6b69c", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_1_2_a.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "ae0618b6-08f2-4924-ba18-6a7f71153e60", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_1_2_b.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"6a6b2f58-8b26-46a0-bc0b-d43d55dcd940","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_1_2_c.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"6c612b01-7d39-4c43-9b07-469fca7a206d","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_2_3.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"7ca85741-ca03-4b74-8e43-788324897f3c","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_3.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"5d1f8501-da0f-477c-b85f-59db6c5a53b1","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter7/Scene_7_4.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"e9b64f18-6984-4107-97b6-721cbc06b671","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "60a5e9a4-7763-4ee6-bfc6-9655a32c6a54", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8/Scene_8_3.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"6d0c227e-a6e8-410a-a3b9-54730a0f318c","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8/Scene_8_4.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "a7b661cd-a89b-4c5a-a50d-40002ece262d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8/Scene_8_5.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"a2e2e9db-87af-4c9d-bacd-36f178af2946","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8/Scene_8_6.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"33e20908-be72-4960-9bda-920d4b1c0a2a","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8/Scene_8_7_1.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"e3235df2-76fa-4bdb-a1a3-cfc96f580fa1","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter8/Scene_8_7_2.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"f5210ea6-0c48-4183-ad39-45fa88d0d5a0","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scenes/Chapter9.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "7b4172c8-a146-4d7f-a5ca-650d28767253", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scenes/Chapter9/Scene_9_2_2_1.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "7e0a86c2-632e-426a-81cd-6bbb1b0d5fd2", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter9/Scene_9_4_2.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.45", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "58075dfb-38fa-4d4f-997e-744ae9d497ba", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scenes/Chapter9/Scene_9_4_5.scene.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.45","importer":"scene","imported":true,"uuid":"a2f133b5-20c9-497a-8ad2-92b42f7784d1","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/scripts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ba72b6df-03de-4350-af45-f605c1a39d11", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/Chapter12.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "bcaa0432-d11b-4396-8c1b-a2f543938147", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/Chapter12/MoveCube.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Component, Node, NodeSpace, Vec3 } from 'cc'; 2 | const { ccclass, property } = _decorator; 3 | 4 | @ccclass('MoveCube') 5 | export class MoveCube extends Component { 6 | @property 7 | public speed: number = 100.0; 8 | private _dir = 1.0; 9 | start() { 10 | 11 | } 12 | 13 | update(deltaTime: number) { 14 | if(this.node.position.x < -2){ 15 | this._dir = 1.0; 16 | } 17 | else if(this.node.position.x > 2){ 18 | this._dir = -1.0; 19 | } 20 | this.node.translate(new Vec3(this.speed * deltaTime * this._dir, 0 , 0), NodeSpace.LOCAL); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /assets/scripts/Chapter12/MoveCube.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "8c0c30c7-dfdf-4978-9f03-bd67a2c4f873", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/Chapter12/RotationCamera.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Component, Node, Vec3 } from 'cc'; 2 | const { ccclass, property } = _decorator; 3 | 4 | @ccclass('RotationCamera') 5 | export class RotationCamera extends Component { 6 | @property 7 | public speed: number = 100.0; 8 | start() { 9 | 10 | } 11 | 12 | update(deltaTime: number) { 13 | var rot = new Vec3(), rot1 = new Vec3(); 14 | Vec3.multiplyScalar(rot, Vec3.UP, deltaTime * this.speed); 15 | this.node.rotation.getEulerAngles(rot1); 16 | rot = rot.add(rot1); 17 | this.node.setRotationFromEuler(rot); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /assets/scripts/Chapter12/RotationCamera.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "94762b7d-e4dc-405b-afbe-8e7386a43270", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "261a4649-0810-4d4b-9f43-e3ffff7bbb8c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4e06c466-42c6-4bce-ae42-a50d93b6aff3", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10/Chapter10-Fresnel.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "5eb411bc-fc96-48f3-b238-8fb877bac7ab", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10/Chapter10-GlassRefraction.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "159708d2-1720-417c-ba78-7fd48569b45a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10/Chapter10-Mirror.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | // 镜子效果依赖渲染纹理实现 https://docs.cocos.com/creator/manual/zh/asset/render-texture.html 3 | // 在编辑器里看不到效果,需要运行起来 4 | CCEffect %{ 5 | techniques: 6 | - name: opaque 7 | passes: 8 | - vert: vs:vert 9 | frag: fs:frag 10 | properties: &props 11 | _MainTex: { value: white } 12 | }% 13 | 14 | 15 | CCProgram vs %{ 16 | precision highp float; 17 | #include 18 | #include 19 | #include <../cc-cg> 20 | in vec3 a_position; 21 | in vec2 a_texCoord; 22 | 23 | out vec4 v_pos; 24 | out vec2 v_uv; 25 | 26 | vec4 vert () { 27 | //顶点坐标变换到投影空间 28 | vec4 vertex = vec4(a_position, 1.0); 29 | v_pos = CCObjectToClipPos(vertex); 30 | 31 | //uv坐标处理 32 | v_uv = a_texCoord; 33 | 34 | //翻转渲染纹理,否则显示出来是反的。 35 | v_uv.x = 1.0 - v_uv.x; 36 | v_uv.y = 1.0 - v_uv.y; 37 | return v_pos; 38 | } 39 | }% 40 | 41 | 42 | CCProgram fs %{ 43 | precision highp float; 44 | #include 45 | #include 46 | 47 | in vec4 v_pos; 48 | in vec2 v_uv; 49 | 50 | uniform sampler2D _MainTex; 51 | 52 | vec4 frag () { 53 | return CCFragOutput(texture(_MainTex, v_uv)); 54 | } 55 | }% 56 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10/Chapter10-Mirror.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "56026d7b-d312-44cb-a036-3385501b2933", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10/Chapter10-Reflection.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "996e8c25-7e3d-41b1-8c93-9022a032d822", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter10/Chapter10-Refraction.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "364fcf2f-95cd-4b3d-b3af-7e67735342ff", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter11.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "649c89ef-750f-4f86-9bec-6ca212f8b93b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter11/Chapter11-Billboard.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "440ded64-6078-4e50-af62-d1b99e6ba0b6", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter11/Chapter11-ImageSequenceAnimation.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "18d374ef-7ca1-482c-8214-8c78389f3d71", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter11/Chapter11-ScrollingBackground.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _MainTex: { editor: { displayName: "Base Layer (RGB)" }, value: white } 11 | _MainTex_ST: { value: [1, 1, 0, 0] } 12 | _DetailTex: { editor: { displayName: "2nd Layer (RGB)" }, value: white } 13 | _DetailTex_ST: { value: [1, 1, 0, 0] } 14 | _ScrollX: { value: 10.0 } 15 | _Scroll2X: { value: 1.0 } 16 | _Multiplier: { value: 1.0 } 17 | }% 18 | 19 | CCProgram vs %{ 20 | precision highp float; 21 | #include 22 | #include 23 | #include <../cc-cg> 24 | in vec3 a_position; 25 | in vec2 a_texCoord; 26 | 27 | out vec4 v_pos; 28 | out vec4 v_uv; 29 | 30 | uniform ConstantV { 31 | vec4 _MainTex_ST; 32 | vec4 _DetailTex_ST; 33 | float _ScrollX; 34 | float _Scroll2X; 35 | }; 36 | 37 | 38 | vec4 vert () { 39 | //顶点坐标变换到投影空间 40 | vec4 vertex = vec4(a_position, 1.0); 41 | v_pos = CCObjectToClipPos(vertex); 42 | 43 | //uv坐标处理 44 | v_uv.xy = TRANSFORM_TEX(a_texCoord, _MainTex_ST) + fract(vec2(_ScrollX, 0.0) * cc_time.x); 45 | v_uv.zw = TRANSFORM_TEX(a_texCoord, _DetailTex_ST) + fract(vec2(_Scroll2X, 0.0) * cc_time.x); 46 | 47 | return v_pos; 48 | } 49 | }% 50 | 51 | CCProgram fs %{ 52 | precision highp float; 53 | #include 54 | #include 55 | #include <../cc-cg> 56 | 57 | in vec4 v_pos; 58 | in vec4 v_uv; 59 | 60 | uniform sampler2D _MainTex; 61 | uniform sampler2D _DetailTex; 62 | 63 | uniform ConstantF { 64 | float _Multiplier; 65 | }; 66 | 67 | vec4 frag () { 68 | vec4 firstLayer = texture(_MainTex, v_uv.xy); 69 | vec4 secondLayer = texture(_DetailTex, v_uv.zw); 70 | 71 | vec4 c = doLerp(firstLayer, secondLayer, secondLayer.a); 72 | c.rgb *= _Multiplier; 73 | return CCFragOutput(c); 74 | } 75 | }% -------------------------------------------------------------------------------- /assets/shaders/Chapter11/Chapter11-ScrollingBackground.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "f7a03fb8-eaf0-4557-a225-ee0f6c97232a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter11/Chapter11-VertexAnimationWIthShadow.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "baaabeee-150d-4688-b647-6117c4661c89", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter11/Chapter11-Water.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "2dfe078f-5fa7-407c-9337-44555228efa0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "944dba79-e44c-48ca-8888-4b65a65541fb", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-Bloom-Bloom.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | //注意:需要手动通过ts代码设定EdgeDetectionMat中的_ScreenWidth和_ScreenHeight为屏幕分辨率 3 | CCEffect %{ 4 | techniques: 5 | - passes: 6 | #模糊pass,unity中用两个pass,但是在cocos中写到一起只有第一个会生效,所以合并2个pass代码到一起,还能提高性能 7 | - vert: vs:vert 8 | frag: fs:frag 9 | pass: post-process #后处理的专用pass类型 10 | properties: &props 11 | _BlurTex: { value: white } 12 | _OriginalTex: { value: white } 13 | 14 | 15 | }% 16 | 17 | CCProgram vs %{ 18 | precision highp float; 19 | 20 | #include 21 | #include 22 | 23 | in vec3 a_position; 24 | in vec2 a_texCoord; 25 | 26 | out vec4 v_uv; 27 | 28 | vec4 vert () { 29 | //顶点处理比较省事,直接输出即可,无需变换空间 30 | vec4 vertex = vec4(a_position, 1.0); 31 | v_uv.zw = a_texCoord; 32 | v_uv.xy = a_texCoord; 33 | 34 | return vertex; 35 | } 36 | 37 | }% 38 | 39 | 40 | CCProgram fs %{ 41 | precision highp float; 42 | 43 | #include 44 | #include <../cc-cg> 45 | 46 | in vec4 v_uv; 47 | 48 | //取高斯后处理图 49 | uniform sampler2D _BlurTex; 50 | //取普通截图 51 | uniform sampler2D _OriginalTex; 52 | 53 | vec4 frag () { 54 | //将两种图合并 55 | return texture(_OriginalTex, v_uv.xy) + texture(_BlurTex, v_uv.zw); 56 | } 57 | }% -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-Bloom-Bloom.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "14463ecf-6bba-42ad-a1b8-7f5b89203c21", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-Bloom-ExtractBright.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | //注意:需要手动通过ts代码设定EdgeDetectionMat中的_ScreenWidth和_ScreenHeight为屏幕分辨率 3 | 4 | CCEffect %{ 5 | techniques: 6 | - passes: 7 | #模糊pass,unity中用两个pass,但是在cocos中写到一起只有第一个会生效,所以合并2个pass代码到一起,还能提高性能 8 | - vert: vs:vert 9 | frag: fs:frag 10 | pass: post-process #后处理的专用pass类型 11 | properties: &props 12 | _LuminanceThreshold: { value: 0.0, editor: { slide: true, range: [0.0, 1.0], step: 0.1, type: float } } 13 | 14 | }% 15 | 16 | CCProgram vs %{ 17 | precision highp float; 18 | 19 | #include 20 | #include 21 | 22 | in vec3 a_position; 23 | in vec2 a_texCoord; 24 | 25 | out vec2 v_uv; 26 | 27 | vec4 vert () { 28 | //顶点处理比较省事,直接输出即可,无需变换空间 29 | vec4 vertex = vec4(a_position, 1.0); 30 | 31 | v_uv = a_texCoord; 32 | 33 | 34 | return vertex; 35 | } 36 | 37 | }% 38 | 39 | 40 | 41 | CCProgram fs %{ 42 | precision highp float; 43 | 44 | #include 45 | #include <../cc-cg> 46 | 47 | in vec2 v_uv; 48 | 49 | #pragma rate inputTexture pass 50 | uniform sampler2D inputTexture; 51 | 52 | uniform ConstantF { 53 | float _LuminanceThreshold; 54 | }; 55 | 56 | float luminance(vec4 color) { 57 | return 0.2125 * color.r + 0.7154 * color.g + 0.0721 * color.b; 58 | } 59 | 60 | vec4 frag () { 61 | vec4 c = texture(inputTexture, v_uv); 62 | float val = clamp(luminance(c) - _LuminanceThreshold, 0.0, 1.0); 63 | return c * val; 64 | } 65 | }% -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-Bloom-ExtractBright.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "34afdfed-96e7-4efa-83a1-4c4ecd151f28", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-BrightnessSaturationAndContrast.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | 3 | CCEffect %{ 4 | techniques: 5 | - passes: 6 | - vert: vs:vert 7 | frag: fs:frag 8 | pass: post-process #后处理的专用pass类型 9 | rasterizerState: 10 | cullMode: none #Cull Off 11 | depthStencilState: 12 | depthTest: true #ZTest Always 13 | depthWrite: false #ZWrite Off 14 | properties: 15 | _Brightness: { value: 1.0, editor: { slide: true, range: [0.0, 3.0], step: 0.1, type: float } } 16 | _Saturation: { value: 1.0, editor: { slide: true, range: [0.0, 3.0], step: 0.1, type: float } } 17 | _Contrast: { value: 1.0, editor: { slide: true, range: [0.0, 3.0], step: 0.1, type: float } } 18 | 19 | }% 20 | 21 | 22 | CCProgram vs %{ 23 | precision highp float; 24 | 25 | #include 26 | #include 27 | 28 | in vec3 a_position; 29 | in vec2 a_texCoord; 30 | 31 | out vec2 v_uv; 32 | 33 | vec4 vert () { 34 | //顶点处理比较省事,直接输出即可,无需变换空间 35 | vec4 vertex = vec4(a_position, 1.0); 36 | 37 | v_uv = a_texCoord; 38 | 39 | return vertex; 40 | } 41 | 42 | }% 43 | 44 | CCProgram fs %{ 45 | precision highp float; 46 | 47 | #include 48 | #include <../cc-cg> 49 | 50 | in vec2 v_uv; 51 | 52 | uniform ConstantF { 53 | float _Brightness; 54 | float _Saturation; 55 | float _Contrast; 56 | }; 57 | 58 | //设置blit采样频率,见 https://docs.cocos.com/creator/manual/zh/render-pipeline/custom-pipeline.html 59 | //inputTexture是cocos默认的blit截图,照抄即可 60 | #pragma rate inputTexture pass 61 | uniform sampler2D inputTexture; 62 | 63 | vec4 frag () { 64 | //blit截图中采样 65 | vec4 renderTex = texture(inputTexture, v_uv); 66 | 67 | //应用亮度 68 | vec3 finalColor = renderTex.rgb * _Brightness; 69 | 70 | //应用饱和度 71 | float luminance = 0.2125 * renderTex.r + 0.7154 * renderTex.g + 0.0721 * renderTex.b; 72 | vec3 luminanceColor = vec3(luminance, luminance, luminance); 73 | finalColor = doLerp(luminanceColor, finalColor, _Saturation); 74 | 75 | //应用对比度 76 | vec3 avgColor = vec3(0.5, 0.5, 0.5); 77 | finalColor = doLerp(avgColor, finalColor, _Contrast); 78 | 79 | //输出最终颜色 80 | return vec4(finalColor, renderTex.a); 81 | } 82 | 83 | 84 | }% -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-BrightnessSaturationAndContrast.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "33e172f5-aab7-4a39-9d03-f0fd82f9f7c0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-EdgeDetection.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "60055b3e-0b18-4901-9e14-8419b2445a3f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-GaussianBlur.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "8aad99a8-fdaf-4e05-8a3d-da560d0fffec", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-MotionBlur.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | //注意:需要手动通过ts代码设定EdgeDetectionMat中的_ScreenWidth和_ScreenHeight为屏幕分辨率 3 | CCEffect %{ 4 | techniques: 5 | - passes: 6 | #模糊pass,unity中用两个pass,但是在cocos中写到一起只有第一个会生效,所以合并2个pass代码到一起,还能提高性能 7 | - vert: vs:vert 8 | frag: fs-rgb:frag 9 | rasterizerState: 10 | cullMode: None 11 | depthStencilState: 12 | depthFunc: less_equal 13 | depthTest: true 14 | depthWrite: false 15 | blendState: 16 | targets: 17 | - blend: true 18 | blendSrc: src_alpha 19 | blendDst: one_minus_src_alpha 20 | blendSrcAlpha: src_alpha 21 | blendDstAlpha: one_minus_src_alpha 22 | # blendColorMask: rgb 23 | pass: post-process #后处理的专用pass类型 24 | properties: &props 25 | _BlurAmount: { value: 0.5, editor: { slide: true, range: [0.0, 0.9], step: 0.1, type: float } } 26 | _LastFrameRenderTexture: { value: white } 27 | 28 | 29 | }% 30 | 31 | CCProgram vs %{ 32 | precision highp float; 33 | 34 | #include 35 | #include 36 | #include <../cc-cg> 37 | 38 | in vec3 a_position; 39 | in vec2 a_texCoord; 40 | 41 | out vec2 v_uv; 42 | 43 | vec4 vert () { 44 | //顶点处理比较省事,直接输出即可,无需变换空间 45 | vec4 vertex = vec4(a_position, 1.0); 46 | 47 | v_uv = a_texCoord; 48 | 49 | return vertex; 50 | } 51 | 52 | }% 53 | 54 | 55 | CCProgram fs-rgb %{ 56 | precision highp float; 57 | 58 | #include 59 | #include <../cc-cg> 60 | 61 | in vec2 v_uv; 62 | 63 | uniform ConstantF { 64 | float _BlurAmount; 65 | }; 66 | 67 | //设置blit采样频率,见 https://docs.cocos.com/creator/manual/zh/render-pipeline/custom-pipeline.html 68 | //inputTexture是cocos默认的blit截图,照抄即可 69 | #pragma rate inputTexture pass 70 | uniform sampler2D inputTexture; 71 | 72 | uniform sampler2D _LastFrameRenderTexture; 73 | 74 | vec4 frag () { 75 | vec4 c = (vec4(texture(inputTexture, v_uv).rgba) * _BlurAmount + vec4(texture(_LastFrameRenderTexture, v_uv)) * (1.0 - _BlurAmount)); 76 | return CCFragOutput(c); 77 | } 78 | 79 | 80 | }% 81 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-MotionBlur.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "d152a00f-92e0-44cf-b67a-a913286a4da2", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-MotionBlur2.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | //注意:需要手动通过ts代码设定EdgeDetectionMat中的_ScreenWidth和_ScreenHeight为屏幕分辨率 3 | CCEffect %{ 4 | techniques: 5 | - passes: 6 | #模糊pass,unity中用两个pass,但是在cocos中写到一起只有第一个会生效,所以合并2个pass代码到一起,还能提高性能 7 | - vert: vs:vert 8 | frag: fs-a:frag 9 | rasterizerState: 10 | cullMode: None 11 | depthStencilState: 12 | depthFunc: less_equal 13 | depthTest: true 14 | depthWrite: false 15 | blendState: 16 | targets: 17 | - blend: true 18 | blendSrc: src_alpha 19 | blendDst: one_minus_src_alpha 20 | blendSrcAlpha: src_alpha 21 | blendDstAlpha: one_minus_src_alpha 22 | blendColorMask: rgb 23 | pass: post-process #后处理的专用pass类型 24 | 25 | 26 | 27 | 28 | 29 | }% 30 | 31 | CCProgram vs %{ 32 | precision highp float; 33 | 34 | #include 35 | #include 36 | #include <../cc-cg> 37 | 38 | in vec3 a_position; 39 | in vec2 a_texCoord; 40 | 41 | out vec2 v_uv; 42 | 43 | vec4 vert () { 44 | //顶点处理比较省事,直接输出即可,无需变换空间 45 | vec4 vertex = vec4(a_position, 1.0); 46 | 47 | v_uv = a_texCoord; 48 | 49 | return vertex; 50 | } 51 | 52 | }% 53 | 54 | CCProgram fs-a %{ 55 | precision highp float; 56 | 57 | #include 58 | #include <../cc-cg> 59 | 60 | in vec2 v_uv; 61 | 62 | //设置blit采样频率,见 https://docs.cocos.com/creator/manual/zh/render-pipeline/custom-pipeline.html 63 | //inputTexture是cocos默认的blit截图,照抄即可 64 | #pragma rate inputTexture pass 65 | uniform sampler2D inputTexture; 66 | 67 | vec4 frag () { 68 | vec4 c = texture(inputTexture, v_uv); 69 | return CCFragOutput(c); 70 | } 71 | 72 | 73 | }% -------------------------------------------------------------------------------- /assets/shaders/Chapter12/Chapter12-MotionBlur2.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "346295c9-24d4-42f4-88c6-ea5c3a61b56b", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter5.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "402cd1eb-7453-4bfb-b37d-300601cccb0d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter5/Chapter5-SimpleShader.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: 10 | _Color: { value: [1, 1, 1, 1], editor: { type: color } } 11 | }% 12 | 13 | CCProgram vs %{ 14 | precision highp float; 15 | #include 16 | #include 17 | in vec4 a_position; 18 | in vec3 a_normal; 19 | 20 | out vec4 v_pos; 21 | out vec3 v_color; 22 | 23 | vec4 vert () { 24 | vec4 vertex = a_position; 25 | vec3 normal = a_normal; 26 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 27 | v_color = normal * 0.5 + vec3(0.5, 0.5, 0.5); 28 | return v_pos; 29 | } 30 | }% 31 | 32 | CCProgram fs %{ 33 | precision highp float; 34 | #include 35 | 36 | in vec4 v_pos; 37 | in vec3 v_color; 38 | 39 | uniform Constant { 40 | vec4 _Color; 41 | }; 42 | 43 | vec4 frag () { 44 | vec3 c = v_color; 45 | c *= _Color.rgb; 46 | return CCFragOutput(vec4(c, 1.0)); 47 | } 48 | }% 49 | -------------------------------------------------------------------------------- /assets/shaders/Chapter5/Chapter5-SimpleShader.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "ef9bfca3-6fb9-4c45-b9ac-5b4ac365f069", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e1756665-37fd-4974-9081-7b170b9a437b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-BlinnPhong.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _Diffuse: { value: [1, 1, 1, 1], editor: { type: color } } 11 | _Specular: { value: [1, 1, 1, 1], editor: { type: color } } 12 | _Gloss: { value: 20.0, editor: { slide: true, range: [8.0, 255.0], step: 1, type: float } } 13 | 14 | }% 15 | 16 | 17 | CCProgram vs %{ 18 | precision highp float; 19 | #include 20 | #include 21 | in vec3 a_position; 22 | in vec3 a_normal; 23 | 24 | out vec4 v_pos; 25 | out vec3 v_worldNormal; 26 | out vec3 v_worldPos; 27 | 28 | #define saturate(a) clamp(a, 0.0, 1.0) 29 | 30 | vec4 vert () { 31 | //顶点坐标变换到投影空间 32 | vec4 vertex = vec4(a_position, 1.0); 33 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 34 | 35 | //法线变换到世界空间 36 | vec3 normal = a_normal; 37 | v_worldNormal = mat3(cc_matWorldIT) * normal; 38 | 39 | //顶点变换到世界坐标 40 | v_worldPos = (cc_matWorld * vertex).xyz; 41 | return v_pos; 42 | } 43 | }% 44 | 45 | 46 | CCProgram fs %{ 47 | precision highp float; 48 | #include 49 | #include 50 | 51 | #define saturate(a) clamp(a, 0.0, 1.0) 52 | 53 | in vec4 v_pos; 54 | in vec3 v_worldNormal; 55 | in vec3 v_worldPos; 56 | 57 | uniform Constant { 58 | vec4 _Diffuse; 59 | vec4 _Specular; 60 | float _Gloss; 61 | }; 62 | 63 | 64 | vec4 frag () { 65 | //获取环境光 66 | vec3 ambient = cc_ambientSky.xyz; 67 | //获取世界空间下的法线 68 | vec3 worldNormal = normalize(v_worldNormal); 69 | //获取世界空间下的平行光方向 70 | vec3 worldLightDir = normalize(-cc_mainLitDir.xyz); 71 | //计算漫反射 72 | vec3 diffuse = cc_mainLitColor.rgb * _Diffuse.rgb * saturate(dot(worldNormal, worldLightDir)); 73 | //获取世界空间下的视线方向 74 | vec3 viewDir = normalize(cc_cameraPos.xyz - v_worldPos); 75 | //获取世界空间下的半程向量 76 | vec3 halfDir = normalize(worldLightDir + viewDir); 77 | //计算高光 78 | vec3 specular = cc_mainLitColor.rgb * _Specular.rgb * pow(saturate(dot(worldNormal, halfDir)), _Gloss); 79 | return CCFragOutput(vec4(ambient + diffuse + specular, 1.0)); 80 | } 81 | }% 82 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-BlinnPhong.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "b262778b-ea62-4748-8e13-4591fb4c6fb0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-DiffusePixelLevel.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _Diffuse: { value: [1, 1, 1, 1], editor: { type: color } } 11 | 12 | 13 | }% 14 | 15 | 16 | CCProgram vs %{ 17 | precision highp float; 18 | #include 19 | #include 20 | in vec3 a_position; 21 | in vec3 a_normal; 22 | 23 | out vec4 v_pos; 24 | out vec3 v_worldNormal; 25 | 26 | #define saturate(a) clamp(a, 0.0, 1.0) 27 | 28 | vec4 vert () { 29 | //顶点坐标变换到投影空间 30 | vec4 vertex = vec4(a_position, 1.0); 31 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 32 | 33 | //法线变换到世界空间 34 | vec3 normal = a_normal; 35 | v_worldNormal = mat3(cc_matWorldIT) * normal; 36 | 37 | return v_pos; 38 | } 39 | }% 40 | 41 | 42 | CCProgram fs %{ 43 | precision highp float; 44 | #include 45 | #include 46 | 47 | #define saturate(a) clamp(a, 0.0, 1.0) 48 | 49 | in vec4 v_pos; 50 | in vec3 v_worldNormal; 51 | 52 | uniform Constant { 53 | vec4 _Diffuse; 54 | }; 55 | 56 | 57 | vec4 frag () { 58 | //获取环境光 59 | vec3 ambient = cc_ambientSky.xyz; 60 | //获取世界空间下的法线 61 | vec3 worldNormal = normalize(v_worldNormal); 62 | //获取世界空间下的平行光方向 63 | vec3 worldLightDir = normalize(-cc_mainLitDir.xyz); 64 | //计算漫反射 65 | vec3 diffuse = cc_mainLitColor.rgb * _Diffuse.rgb * saturate(dot(worldNormal, worldLightDir)); 66 | vec3 color = ambient + diffuse; 67 | return CCFragOutput(vec4(color, 1.0)); 68 | } 69 | }% 70 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-DiffusePixelLevel.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "99b1a307-c218-4640-8b0c-3e8aa23bf537", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-DiffuseVertexLevel.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _Diffuse: { value: [1, 1, 1, 1], editor: { type: color } } 11 | 12 | 13 | }% 14 | 15 | 16 | CCProgram vs %{ 17 | precision highp float; 18 | #include 19 | #include 20 | in vec3 a_position; 21 | in vec3 a_normal; 22 | 23 | out vec4 v_pos; 24 | out vec3 v_color; 25 | 26 | uniform Constant { 27 | vec4 _Diffuse; 28 | }; 29 | 30 | #define saturate(a) clamp(a, 0.0, 1.0) 31 | 32 | vec4 vert () { 33 | //顶点坐标变换到投影空间 34 | vec4 vertex = vec4(a_position, 1.0); 35 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 36 | //获取环境光 37 | vec3 ambient = cc_ambientSky.xyz; 38 | //法线变换到世界空间 39 | vec3 normal = a_normal; 40 | vec3 worldNormal = mat3(cc_matWorldIT) * normal; 41 | //获取世界空间下的平行光方向 42 | vec3 worldLightDir = normalize(-cc_mainLitDir.xyz); 43 | //计算漫反射 44 | vec3 diffuse = cc_mainLitColor.rgb * _Diffuse.rgb * saturate(dot(worldNormal, worldLightDir)); 45 | v_color = ambient + diffuse; 46 | return v_pos; 47 | } 48 | }% 49 | 50 | 51 | CCProgram fs %{ 52 | precision highp float; 53 | #include 54 | #include 55 | 56 | in vec4 v_pos; 57 | in vec3 v_color; 58 | 59 | vec4 frag () { 60 | return CCFragOutput(vec4(v_color, 1.0)); 61 | } 62 | }% 63 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-DiffuseVertexLevel.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "1621641c-3f47-4508-ae80-597e61201dbc", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-HalfLambert.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _Diffuse: { value: [1, 1, 1, 1], editor: { type: color } } 11 | 12 | 13 | }% 14 | 15 | CCProgram vs %{ 16 | precision highp float; 17 | #include 18 | #include 19 | in vec3 a_position; 20 | in vec3 a_normal; 21 | 22 | out vec4 v_pos; 23 | out vec3 v_worldNormal; 24 | 25 | vec4 vert () { 26 | vec4 vertex = vec4(a_position, 1.0); 27 | vec3 normal = a_normal; 28 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 29 | v_worldNormal = mat3(cc_matWorldIT) * normal; 30 | return v_pos; 31 | } 32 | }% 33 | 34 | 35 | CCProgram fs %{ 36 | precision highp float; 37 | #include 38 | #include 39 | 40 | in vec4 v_pos; 41 | in vec3 v_worldNormal; 42 | 43 | #define saturate(a) clamp(a, 0.0, 1.0) 44 | 45 | uniform Constant { 46 | vec4 _Diffuse; 47 | }; 48 | 49 | vec4 frag () { 50 | //获取环境光 51 | vec3 ambient = cc_ambientSky.xyz; 52 | //法线变换到世界空间 53 | vec3 worldNormal = normalize(v_worldNormal); 54 | //获取世界空间下的平行光方向 55 | vec3 worldLightDir = normalize(-cc_mainLitDir.xyz); 56 | //计算半兰伯特模型 57 | float halfLambert = dot(worldNormal, worldLightDir) * 0.5 + 0.5; 58 | //计算漫反射 59 | vec3 diffuse = cc_mainLitColor.rgb * _Diffuse.rgb * halfLambert; 60 | vec3 color = ambient + diffuse; 61 | return CCFragOutput(vec4(color, 1.0)); 62 | } 63 | }% 64 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-HalfLambert.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "32e19f7c-b224-4cd9-8c22-e7fde83bae7f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-SpecularPixelLevel.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "387289a1-6500-43fd-befa-13d4c5d7c182", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-SpecularVertexLevel.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _Diffuse: { value: [1, 1, 1, 1], editor: { type: color } } 11 | _Specular: { value: [1, 1, 1, 1], editor: { type: color } } 12 | _Gloss: { value: 20.0, editor: { slide: true, range: [8.0, 255.0], step: 1, type: float } } 13 | 14 | 15 | }% 16 | 17 | 18 | CCProgram vs %{ 19 | precision highp float; 20 | #include 21 | #include 22 | in vec3 a_position; 23 | in vec3 a_normal; 24 | 25 | out vec4 v_pos; 26 | out vec3 v_color; 27 | 28 | uniform Constant { 29 | vec4 _Diffuse; 30 | vec4 _Specular; 31 | float _Gloss; 32 | }; 33 | 34 | #define saturate(a) clamp(a, 0.0, 1.0) 35 | 36 | vec4 vert () { 37 | //顶点坐标变换到投影空间 38 | vec4 vertex = vec4(a_position, 1.0); 39 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 40 | 41 | //获取环境光 42 | vec3 ambient = cc_ambientSky.xyz; 43 | 44 | //法线变换到世界空间 45 | vec3 normal = a_normal; 46 | vec3 worldNormal = normalize(mat3(cc_matWorldIT) * normal); 47 | 48 | //获取世界空间下的平行光方向 49 | vec3 worldLightDir = normalize(-cc_mainLitDir.xyz); 50 | //计算漫反射 51 | vec3 diffuse = cc_mainLitColor.rgb * _Diffuse.rgb * saturate(dot(worldNormal, worldLightDir)); 52 | //获取世界空间下的反射向量 53 | vec3 reflectDir = normalize(reflect(-worldLightDir, worldNormal)); 54 | //获取世界空间下的视线方向 55 | vec3 viewDir = normalize(cc_cameraPos.xyz - (cc_matWorld * vertex).xyz); 56 | //计算高光 57 | vec3 specular = cc_mainLitColor.rgb * _Specular.rgb * pow(saturate(dot(reflectDir, viewDir)), _Gloss); 58 | v_color = ambient + diffuse + specular; 59 | return v_pos; 60 | } 61 | }% 62 | 63 | 64 | CCProgram fs %{ 65 | precision highp float; 66 | #include 67 | #include 68 | 69 | in vec4 v_pos; 70 | in vec3 v_color; 71 | 72 | vec4 frag () { 73 | return CCFragOutput(vec4(v_color, 1.0)); 74 | } 75 | }% 76 | -------------------------------------------------------------------------------- /assets/shaders/Chapter6/Chapter6-SpecularVertexLevel.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.7.0","importer":"effect","imported":true,"uuid":"cc736f04-d88f-42de-b5c8-e2d7a9e44fd6","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "565e6aa0-bbe7-4048-af55-a9eb70d643a9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7/Chapter7-MaskTexture.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "cf0523c7-61bf-4ea9-a42b-428ab3ca98dd", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7/Chapter7-NormalMapTangentSpace.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "7e8eb9dd-635f-405e-928b-a5c52ffd72a1", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7/Chapter7-RampTexture.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "ab58feeb-4b5d-45d1-80ad-11d782f81330", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7/Chapter7-SingleTexture.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "c02de083-63d9-47ad-9187-0ae0220bc22a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7/Chapter7-TextureProperties.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: opaque 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | properties: &props 10 | _MainTex: { value: white } 11 | _TilingAndOffset: { value: [1, 1, 0, 0] } 12 | 13 | }% 14 | 15 | 16 | CCProgram vs %{ 17 | precision highp float; 18 | #include 19 | #include 20 | in vec3 a_position; 21 | in vec2 a_texCoord; 22 | 23 | out vec4 v_pos; 24 | out vec2 v_uv; 25 | 26 | uniform ConstantV { 27 | vec4 _TilingAndOffset; 28 | }; 29 | 30 | vec4 vert () { 31 | //顶点坐标变换到投影空间 32 | vec4 vertex = vec4(a_position, 1.0); 33 | v_pos = cc_matProj * (cc_matView * cc_matWorld) * vertex; 34 | 35 | //uv坐标处理 36 | v_uv = a_texCoord * _TilingAndOffset.xy + _TilingAndOffset.zw; 37 | return v_pos; 38 | } 39 | }% 40 | 41 | 42 | CCProgram fs %{ 43 | precision highp float; 44 | #include 45 | #include 46 | 47 | in vec4 v_pos; 48 | in vec2 v_uv; 49 | 50 | uniform sampler2D _MainTex; 51 | 52 | vec4 frag () { 53 | 54 | //从贴图获取反照率 55 | vec3 albedo = texture(_MainTex, v_uv).rgb; 56 | 57 | return CCFragOutput(vec4(albedo, 1.0)); 58 | } 59 | }% 60 | -------------------------------------------------------------------------------- /assets/shaders/Chapter7/Chapter7-TextureProperties.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "e5df3542-f83a-4434-9f18-8fe970eb07a5", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "23701010-290a-49d8-8c47-e35df385f90e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-AlphaBlend.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "8d42cb71-e873-4c91-a7dd-6241d54efa91", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-AlphaBlendBothSided.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.7.0","importer":"effect","imported":true,"uuid":"0b5e453c-555b-4c94-a2af-f54e1784b72c","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-AlphaBlendZWrite.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "8245982a-26ae-49c5-b631-773381f1acf0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-AlphaTest.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "022e2353-38c8-45f8-bb1a-b1b3a92214de", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-AlphaTestBothSided.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "3f8b52a1-dd18-4b5c-b19b-b5e21e628395", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-BlendOperations0.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: transparent 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | depthStencilState: #ZWrite Off 10 | depthFunc: less 11 | depthTest: true 12 | depthWrite: false 13 | blendState: #Blend SrcAlpha OneMinusSrcAlpha, One Zero 14 | targets: 15 | - blend: true 16 | blendSrc: src_alpha 17 | blendDst: one_minus_src_alpha 18 | blendAlphaSrc: one 19 | blendAlphaDst: zero 20 | properties: &props 21 | _Color: { value: [1, 1, 1, 1], editor: { type: color } } 22 | _MainTex: { value: white } 23 | _MainTex_ST: { value: [1, 1, 0, 0] } 24 | _AlphaScale: { value: 1.0, editor: { slide: true, range: [0.0, 1.0], step: 0.1, type: float } } 25 | }% 26 | 27 | CCProgram vs %{ 28 | precision highp float; 29 | #include 30 | #include 31 | #include <../cc-cg> 32 | in vec3 a_position; 33 | in vec2 a_texCoord; 34 | 35 | out vec4 v_pos; 36 | out vec2 v_uv; 37 | 38 | uniform ConstantV { 39 | vec4 _MainTex_ST; 40 | }; 41 | 42 | vec4 vert () { 43 | //顶点坐标变换到投影空间 44 | vec4 vertex = vec4(a_position, 1.0); 45 | v_pos = CCObjectToClipPos(vertex); 46 | 47 | //uv坐标处理 48 | v_uv = TRANSFORM_TEX(a_texCoord, _MainTex_ST); 49 | return v_pos; 50 | } 51 | }% 52 | 53 | 54 | CCProgram fs %{ 55 | precision highp float; 56 | #include 57 | #include 58 | #include <../cc-cg> 59 | 60 | in vec4 v_pos; 61 | in vec2 v_uv; 62 | 63 | uniform ConstantF { 64 | vec4 _Color; 65 | float _AlphaScale; 66 | }; 67 | uniform sampler2D _MainTex; 68 | 69 | vec4 frag () { 70 | //从贴图获取反照率 71 | vec4 texColor = texture(_MainTex, v_uv); 72 | 73 | return CCFragOutput(vec4(texColor.rgb * _Color.rgb, texColor.a * _AlphaScale)); 74 | } 75 | }% 76 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-BlendOperations0.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.7.0","importer":"effect","imported":true,"uuid":"b3a82d70-62b3-4898-a703-275a5dfc8416","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-BlendOperations1.effect: -------------------------------------------------------------------------------- 1 | // Effect Syntax Guide: https://docs.cocos.com/creator/manual/zh/shader/index.html 2 | 3 | CCEffect %{ 4 | techniques: 5 | - name: transparent 6 | passes: 7 | - vert: vs:vert 8 | frag: fs:frag 9 | depthStencilState: #ZWrite Off 10 | depthFunc: less 11 | depthTest: true 12 | depthWrite: false 13 | blendState: #启用blend,自己在shader面板中自己调各种blend看效果就行了 14 | targets: 15 | - blend: true 16 | properties: &props 17 | _Color: { value: [1, 1, 1, 1], editor: { type: color } } 18 | _MainTex: { value: white } 19 | _MainTex_ST: { value: [1, 1, 0, 0] } 20 | _AlphaScale: { value: 1.0, editor: { slide: true, range: [0.0, 1.0], step: 0.1, type: float } } 21 | }% 22 | 23 | CCProgram vs %{ 24 | precision highp float; 25 | #include 26 | #include 27 | #include <../cc-cg> 28 | in vec3 a_position; 29 | in vec2 a_texCoord; 30 | 31 | out vec4 v_pos; 32 | out vec2 v_uv; 33 | 34 | uniform ConstantV { 35 | vec4 _MainTex_ST; 36 | }; 37 | 38 | vec4 vert () { 39 | //顶点坐标变换到投影空间 40 | vec4 vertex = vec4(a_position, 1.0); 41 | v_pos = CCObjectToClipPos(vertex); 42 | 43 | //uv坐标处理 44 | v_uv = TRANSFORM_TEX(a_texCoord, _MainTex_ST); 45 | return v_pos; 46 | } 47 | }% 48 | 49 | 50 | CCProgram fs %{ 51 | precision highp float; 52 | #include 53 | #include 54 | #include <../cc-cg> 55 | 56 | in vec4 v_pos; 57 | in vec2 v_uv; 58 | 59 | uniform ConstantF { 60 | vec4 _Color; 61 | float _AlphaScale; 62 | }; 63 | uniform sampler2D _MainTex; 64 | 65 | vec4 frag () { 66 | //从贴图获取反照率 67 | vec4 texColor = texture(_MainTex, v_uv); 68 | 69 | return CCFragOutput(vec4(texColor.rgb * _Color.rgb, texColor.a * _AlphaScale)); 70 | } 71 | }% 72 | -------------------------------------------------------------------------------- /assets/shaders/Chapter8/Chapter8-BlendOperations1.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.7.0","importer":"effect","imported":true,"uuid":"a2bc2e47-8adf-46e5-b42e-7686e176ba9c","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/shaders/Chapter9.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "7a2848d9-955e-4fef-9a2f-b394c3ad9bc6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/Chapter9/Chapter9-AlphaTestWithShadow.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "cbc5ea01-8481-40e0-a2ee-a57335d08392", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter9/Chapter9-ForwardRendering.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "6eb3ea5b-584d-4df6-9ea8-90fc087474a7", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/Chapter9/Chapter9-Shadow.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "78ba064a-7f36-49c4-bdda-84ac695b0b04", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/cc-cg.chunk.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.7", 3 | "importer": "effect-header", 4 | "imported": true, 5 | "uuid": "ebb2f0ee-3339-441c-9b6e-f3bf7e40c4cf", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/custom-common-function.chunk.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.7", 3 | "importer": "effect-header", 4 | "imported": true, 5 | "uuid": "10021401-cfff-436f-8dff-cc1ca4e4d698", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/custom-function.chunk.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.7", 3 | "importer": "effect-header", 4 | "imported": true, 5 | "uuid": "6575599a-1909-49b2-b935-6d0942a15c73", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/custom-function.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.7.0", 3 | "importer": "effect", 4 | "imported": false, 5 | "uuid": "4c4a0864-d665-4901-88a3-3f08183f63ca", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/material.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "1fe14914-3310-40fd-9afe-ae0d7eead506", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/textures.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "e4c8ce08-9ae0-4f85-8b08-12cdf68ab767", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter10.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "6bc3cacc-c3e6-4b89-986b-d7bbe5e7a6b9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemap_0.cubemap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemap_0.cubemap -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemap_0.cubemap.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.4", 3 | "importer": "texture-cube", 4 | "imported": true, 5 | "uuid": "077af038-c078-4e5e-b2cb-4c5d818e1a64", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "wrapModeS": "repeat", 12 | "wrapModeT": "repeat", 13 | "minfilter": "linear", 14 | "magfilter": "linear", 15 | "mipfilter": "none", 16 | "anisotropy": 0, 17 | "isRGBE": false, 18 | "left": "ab33278a-12c7-4ebe-b641-08e7729cf27a", 19 | "bottom": "6dddcd16-1804-49fe-8614-2e0e744a1bba", 20 | "back": "4f9753f5-09f6-4837-a882-80b88200167b", 21 | "right": "c6f3b59c-470b-40ae-bc7e-e3504bbe53da", 22 | "top": "21debddd-70da-4406-aebf-6ef501ab7c59", 23 | "front": "26b0840d-a7e1-44f6-a90e-4acf8a5fc4d7", 24 | "faceSize": 256 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "339d91a4-c83c-4d35-aa8d-a67ff452bcaa", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemaps/negx.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/negx.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "ab33278a-12c7-4ebe-b641-08e7729cf27a", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "ab33278a-12c7-4ebe-b641-08e7729cf27a@6c48a", 14 | "displayName": "negx", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "ab33278a-12c7-4ebe-b641-08e7729cf27a", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "ab33278a-12c7-4ebe-b641-08e7729cf27a@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemaps/negy.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/negy.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6dddcd16-1804-49fe-8614-2e0e744a1bba", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6dddcd16-1804-49fe-8614-2e0e744a1bba@6c48a", 14 | "displayName": "negy", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6dddcd16-1804-49fe-8614-2e0e744a1bba", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "6dddcd16-1804-49fe-8614-2e0e744a1bba@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemaps/negz.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/negz.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "4f9753f5-09f6-4837-a882-80b88200167b", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "4f9753f5-09f6-4837-a882-80b88200167b@6c48a", 14 | "displayName": "negz", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "4f9753f5-09f6-4837-a882-80b88200167b", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "4f9753f5-09f6-4837-a882-80b88200167b@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemaps/posx.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/posx.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "c6f3b59c-470b-40ae-bc7e-e3504bbe53da", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "c6f3b59c-470b-40ae-bc7e-e3504bbe53da@6c48a", 14 | "displayName": "posx", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "c6f3b59c-470b-40ae-bc7e-e3504bbe53da", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "c6f3b59c-470b-40ae-bc7e-e3504bbe53da@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemaps/posy.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/posy.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "21debddd-70da-4406-aebf-6ef501ab7c59", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "21debddd-70da-4406-aebf-6ef501ab7c59@6c48a", 14 | "displayName": "posy", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "21debddd-70da-4406-aebf-6ef501ab7c59", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "21debddd-70da-4406-aebf-6ef501ab7c59@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter10/Cubemaps/posz.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter10/Cubemaps/posz.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "26b0840d-a7e1-44f6-a90e-4acf8a5fc4d7", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "26b0840d-a7e1-44f6-a90e-4acf8a5fc4d7@6c48a", 14 | "displayName": "posz", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "26b0840d-a7e1-44f6-a90e-4acf8a5fc4d7", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "26b0840d-a7e1-44f6-a90e-4acf8a5fc4d7@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter10/MirrorTexture.rt: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.RenderTexture", 3 | "content": { 4 | "base": "2,2,2,2,0,0", 5 | "w": 1024, 6 | "h": 1024, 7 | "n": "MirrorTexture" 8 | } 9 | } -------------------------------------------------------------------------------- /assets/textures/Chapter10/MirrorTexture.rt.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.2", 3 | "importer": "render-texture", 4 | "imported": true, 5 | "uuid": "4ed58fda-5ac9-4b4c-8a0e-b4d2cbb39202", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": { 10 | "f9941": { 11 | "importer": "rt-sprite-frame", 12 | "uuid": "4ed58fda-5ac9-4b4c-8a0e-b4d2cbb39202@f9941", 13 | "displayName": "MirrorTexture", 14 | "id": "f9941", 15 | "name": "spriteFrame", 16 | "userData": { 17 | "imageUuidOrDatabaseUri": "4ed58fda-5ac9-4b4c-8a0e-b4d2cbb39202", 18 | "width": 1024, 19 | "height": 1024 20 | }, 21 | "ver": "1.0.0", 22 | "imported": true, 23 | "files": [ 24 | ".json" 25 | ], 26 | "subMetas": {} 27 | } 28 | }, 29 | "userData": { 30 | "width": 1024, 31 | "height": 1024, 32 | "anisotropy": 0, 33 | "minfilter": "linear", 34 | "magfilter": "linear", 35 | "mipfilter": "none", 36 | "wrapModeS": "clamp-to-edge", 37 | "wrapModeT": "clamp-to-edge", 38 | "redirect": "4ed58fda-5ac9-4b4c-8a0e-b4d2cbb39202@f9941" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/textures/Chapter11.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "7a511aa6-85d9-4dac-919c-e03b2a2b956f", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/Flame_1.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/Flame_1.tga -------------------------------------------------------------------------------- /assets/textures/Chapter11/Flame_1.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "3044f227-79a7-4076-bf27-ff74eaa11095", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "3044f227-79a7-4076-bf27-ff74eaa11095@6c48a", 14 | "displayName": "Flame_1", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "3044f227-79a7-4076-bf27-ff74eaa11095", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "3044f227-79a7-4076-bf27-ff74eaa11095@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/boom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/boom.png -------------------------------------------------------------------------------- /assets/textures/Chapter11/boom.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "bd3258f5-ebd8-48e7-8953-0759d54da48a", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "bd3258f5-ebd8-48e7-8953-0759d54da48a@6c48a", 14 | "displayName": "boom", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 1, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "bd3258f5-ebd8-48e7-8953-0759d54da48a", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "bd3258f5-ebd8-48e7-8953-0759d54da48a@6c48a", 41 | "flipVertical": false 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/far_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/far_background.png -------------------------------------------------------------------------------- /assets/textures/Chapter11/far_background.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "710a0514-841b-4682-ae9f-772a046e67b4", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "710a0514-841b-4682-ae9f-772a046e67b4@6c48a", 14 | "displayName": "far_background", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "710a0514-841b-4682-ae9f-772a046e67b4", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "710a0514-841b-4682-ae9f-772a046e67b4@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/flame_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/flame_0.png -------------------------------------------------------------------------------- /assets/textures/Chapter11/flame_0.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "fbf11516-73d4-47ea-b366-8372f49bc49b", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "fbf11516-73d4-47ea-b366-8372f49bc49b@6c48a", 14 | "displayName": "flame_0", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "fbf11516-73d4-47ea-b366-8372f49bc49b", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "fbf11516-73d4-47ea-b366-8372f49bc49b@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/near_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/near_background.png -------------------------------------------------------------------------------- /assets/textures/Chapter11/near_background.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "d264e60b-71cd-4e1e-b48d-14fe28c7991f", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "d264e60b-71cd-4e1e-b48d-14fe28c7991f@6c48a", 14 | "displayName": "near_background", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "d264e60b-71cd-4e1e-b48d-14fe28c7991f", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "d264e60b-71cd-4e1e-b48d-14fe28c7991f@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/star.png -------------------------------------------------------------------------------- /assets/textures/Chapter11/star.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "e3a47558-2268-4bec-968f-24b63f41c086", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "e3a47558-2268-4bec-968f-24b63f41c086@6c48a", 14 | "displayName": "star", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "e3a47558-2268-4bec-968f-24b63f41c086", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "e3a47558-2268-4bec-968f-24b63f41c086@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter11/water.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter11/water.psd -------------------------------------------------------------------------------- /assets/textures/Chapter11/water.psd.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "de790f27-d375-4490-ba80-64d49f0efdf9", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "de790f27-d375-4490-ba80-64d49f0efdf9@6c48a", 14 | "displayName": "water", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "de790f27-d375-4490-ba80-64d49f0efdf9", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "de790f27-d375-4490-ba80-64d49f0efdf9@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter12.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ccb5669d-eada-435a-9f6c-ba3f72807407", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/bloom-blur-rt.rt: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.RenderTexture", 3 | "content": { 4 | "base": "2,2,0,0,0,0", 5 | "w": 1024, 6 | "h": 1024, 7 | "n": "bloom-rt" 8 | } 9 | } -------------------------------------------------------------------------------- /assets/textures/Chapter12/bloom-blur-rt.rt.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.2", 3 | "importer": "render-texture", 4 | "imported": true, 5 | "uuid": "9bb18040-826e-4a1a-a3c4-dc7a8903ecdc", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": { 10 | "f9941": { 11 | "importer": "rt-sprite-frame", 12 | "uuid": "9bb18040-826e-4a1a-a3c4-dc7a8903ecdc@f9941", 13 | "displayName": "bloom-blur-rt", 14 | "id": "f9941", 15 | "name": "spriteFrame", 16 | "userData": { 17 | "imageUuidOrDatabaseUri": "9bb18040-826e-4a1a-a3c4-dc7a8903ecdc", 18 | "width": 1024, 19 | "height": 1024 20 | }, 21 | "ver": "1.0.0", 22 | "imported": true, 23 | "files": [ 24 | ".json" 25 | ], 26 | "subMetas": {} 27 | } 28 | }, 29 | "userData": { 30 | "width": 1024, 31 | "height": 1024, 32 | "anisotropy": 0, 33 | "minfilter": "linear", 34 | "magfilter": "linear", 35 | "mipfilter": "none", 36 | "wrapModeS": "repeat", 37 | "wrapModeT": "repeat", 38 | "redirect": "9bb18040-826e-4a1a-a3c4-dc7a8903ecdc@f9941" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/bloom-original-rt.rt: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.RenderTexture", 3 | "content": { 4 | "base": "2,2,0,0,0,0", 5 | "w": 1024, 6 | "h": 1024, 7 | "n": "render-texture" 8 | } 9 | } -------------------------------------------------------------------------------- /assets/textures/Chapter12/bloom-original-rt.rt.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.2", 3 | "importer": "render-texture", 4 | "imported": true, 5 | "uuid": "aa190d0a-8414-45c2-bc7c-c45b16edee0c", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": { 10 | "f9941": { 11 | "importer": "rt-sprite-frame", 12 | "uuid": "aa190d0a-8414-45c2-bc7c-c45b16edee0c@f9941", 13 | "displayName": "bloom-original-rt", 14 | "id": "f9941", 15 | "name": "spriteFrame", 16 | "userData": { 17 | "imageUuidOrDatabaseUri": "aa190d0a-8414-45c2-bc7c-c45b16edee0c", 18 | "width": 1024, 19 | "height": 1024 20 | }, 21 | "ver": "1.0.0", 22 | "imported": true, 23 | "files": [ 24 | ".json" 25 | ], 26 | "subMetas": {} 27 | } 28 | }, 29 | "userData": { 30 | "width": 1024, 31 | "height": 1024, 32 | "anisotropy": 0, 33 | "minfilter": "linear", 34 | "magfilter": "linear", 35 | "mipfilter": "none", 36 | "wrapModeS": "repeat", 37 | "wrapModeT": "repeat", 38 | "redirect": "aa190d0a-8414-45c2-bc7c-c45b16edee0c@f9941" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/lotus0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter12/lotus0.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter12/lotus0.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "57cd27db-5322-47bc-b11a-d803f85b6411", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "57cd27db-5322-47bc-b11a-d803f85b6411@6c48a", 14 | "displayName": "lotus0", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "57cd27db-5322-47bc-b11a-d803f85b6411", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "57cd27db-5322-47bc-b11a-d803f85b6411@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/lotus1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter12/lotus1.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter12/lotus1.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "5caa9eea-8991-47fc-b14c-c4cda7b4976b", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "5caa9eea-8991-47fc-b14c-c4cda7b4976b@6c48a", 14 | "displayName": "lotus1", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "5caa9eea-8991-47fc-b14c-c4cda7b4976b", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "5caa9eea-8991-47fc-b14c-c4cda7b4976b@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/lotus2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter12/lotus2.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter12/lotus2.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "2e1e3feb-7371-4d4f-aff8-18ec2b4eb9c1", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "2e1e3feb-7371-4d4f-aff8-18ec2b4eb9c1@6c48a", 14 | "displayName": "lotus2", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "2e1e3feb-7371-4d4f-aff8-18ec2b4eb9c1", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "2e1e3feb-7371-4d4f-aff8-18ec2b4eb9c1@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/render-texture.rt: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.RenderTexture", 3 | "content": { 4 | "base": "2,2,0,0,0,0", 5 | "w": 2048, 6 | "h": 2048, 7 | "n": "render-texture" 8 | } 9 | } -------------------------------------------------------------------------------- /assets/textures/Chapter12/render-texture.rt.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.2", 3 | "importer": "render-texture", 4 | "imported": true, 5 | "uuid": "2ecd2051-eeb8-44f2-ba3a-2d48d030a2ee", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": { 10 | "f9941": { 11 | "importer": "rt-sprite-frame", 12 | "uuid": "2ecd2051-eeb8-44f2-ba3a-2d48d030a2ee@f9941", 13 | "displayName": "render-texture", 14 | "id": "f9941", 15 | "name": "spriteFrame", 16 | "userData": { 17 | "imageUuidOrDatabaseUri": "2ecd2051-eeb8-44f2-ba3a-2d48d030a2ee", 18 | "width": 2048, 19 | "height": 2048 20 | }, 21 | "ver": "1.0.0", 22 | "imported": true, 23 | "files": [ 24 | ".json" 25 | ], 26 | "subMetas": {} 27 | } 28 | }, 29 | "userData": { 30 | "width": 2048, 31 | "height": 2048, 32 | "anisotropy": 0, 33 | "minfilter": "linear", 34 | "magfilter": "linear", 35 | "mipfilter": "none", 36 | "wrapModeS": "repeat", 37 | "wrapModeT": "repeat", 38 | "redirect": "2ecd2051-eeb8-44f2-ba3a-2d48d030a2ee@f9941" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/textures/Chapter12/sakura0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter12/sakura0.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter12/sakura1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter12/sakura1.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter12/sakura2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter12/sakura2.jpg -------------------------------------------------------------------------------- /assets/textures/Chapter7.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "864e1012-347b-42e8-a08b-9e745a955513", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Block.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Block.JPG -------------------------------------------------------------------------------- /assets/textures/Chapter7/Block.JPG.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "8d48a781-f8b3-4bf9-a7fb-85d17b7c8764", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "8d48a781-f8b3-4bf9-a7fb-85d17b7c8764@6c48a", 14 | "displayName": "Block", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "8d48a781-f8b3-4bf9-a7fb-85d17b7c8764", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "8d48a781-f8b3-4bf9-a7fb-85d17b7c8764@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Brick_Diffuse.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Brick_Diffuse.JPG -------------------------------------------------------------------------------- /assets/textures/Chapter7/Brick_Diffuse.JPG.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "9363aba0-160a-4947-a1ba-e4418899742c", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "9363aba0-160a-4947-a1ba-e4418899742c@6c48a", 14 | "displayName": "Brick_Diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "9363aba0-160a-4947-a1ba-e4418899742c", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "9363aba0-160a-4947-a1ba-e4418899742c@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Brick_Normal.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Brick_Normal.JPG -------------------------------------------------------------------------------- /assets/textures/Chapter7/Brick_Normal.JPG.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6b58e39d-a165-47d5-8178-3aecd5cc5e73", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "3c318": { 12 | "importer": "texture", 13 | "uuid": "6b58e39d-a165-47d5-8178-3aecd5cc5e73@3c318", 14 | "displayName": "Brick_Normal", 15 | "id": "3c318", 16 | "name": "normalMap", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6b58e39d-a165-47d5-8178-3aecd5cc5e73" 26 | }, 27 | "ver": "1.0.22", 28 | "imported": true, 29 | "files": [ 30 | ".json" 31 | ], 32 | "subMetas": {} 33 | } 34 | }, 35 | "userData": { 36 | "fixAlphaTransparencyArtifacts": true, 37 | "hasAlpha": false, 38 | "type": "normal map", 39 | "redirect": "6b58e39d-a165-47d5-8178-3aecd5cc5e73@3c318" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Checkerboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Checkerboard.png -------------------------------------------------------------------------------- /assets/textures/Chapter7/Checkerboard.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "9f520da8-7c8b-47d6-be94-712fc0a3dd40", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "9f520da8-7c8b-47d6-be94-712fc0a3dd40@6c48a", 14 | "displayName": "Checkerboard", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "9f520da8-7c8b-47d6-be94-712fc0a3dd40", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "9f520da8-7c8b-47d6-be94-712fc0a3dd40@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Floor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Floor.png -------------------------------------------------------------------------------- /assets/textures/Chapter7/Floor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "5ca54b02-afbc-41d3-adfc-4bb1377f4f71", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "5ca54b02-afbc-41d3-adfc-4bb1377f4f71@6c48a", 14 | "displayName": "Floor", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "5ca54b02-afbc-41d3-adfc-4bb1377f4f71", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "5ca54b02-afbc-41d3-adfc-4bb1377f4f71@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Grid.png -------------------------------------------------------------------------------- /assets/textures/Chapter7/Grid.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "b4599158-10fb-4438-bc62-45fdbee01d5e", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "b4599158-10fb-4438-bc62-45fdbee01d5e@6c48a", 14 | "displayName": "Grid", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "b4599158-10fb-4438-bc62-45fdbee01d5e", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "b4599158-10fb-4438-bc62-45fdbee01d5e@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Ramp_Texture0.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Ramp_Texture0.psd -------------------------------------------------------------------------------- /assets/textures/Chapter7/Ramp_Texture0.psd.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "8bfcc117-0c1e-4713-a60e-49b39bac96a2", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "8bfcc117-0c1e-4713-a60e-49b39bac96a2@6c48a", 14 | "displayName": "Ramp_Texture0", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "8bfcc117-0c1e-4713-a60e-49b39bac96a2", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "8bfcc117-0c1e-4713-a60e-49b39bac96a2@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Ramp_Texture1.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Ramp_Texture1.psd -------------------------------------------------------------------------------- /assets/textures/Chapter7/Ramp_Texture1.psd.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "78be69b0-acdf-4fd0-927e-c0cc94ced1b9", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "78be69b0-acdf-4fd0-927e-c0cc94ced1b9@6c48a", 14 | "displayName": "Ramp_Texture1", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "78be69b0-acdf-4fd0-927e-c0cc94ced1b9", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "78be69b0-acdf-4fd0-927e-c0cc94ced1b9@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Ramp_Texture2.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Ramp_Texture2.psd -------------------------------------------------------------------------------- /assets/textures/Chapter7/Ramp_Texture2.psd.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "80e9a9af-8068-4fd0-adb8-0eb8cafee5f3", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "80e9a9af-8068-4fd0-adb8-0eb8cafee5f3@6c48a", 14 | "displayName": "Ramp_Texture2", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "clamp-to-edge", 19 | "wrapModeT": "clamp-to-edge", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "80e9a9af-8068-4fd0-adb8-0eb8cafee5f3", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "80e9a9af-8068-4fd0-adb8-0eb8cafee5f3@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Road_Diffuse.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Road_Diffuse.tga -------------------------------------------------------------------------------- /assets/textures/Chapter7/Road_Diffuse.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "cd8078ec-bc95-45af-a3db-736773e88a71", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "cd8078ec-bc95-45af-a3db-736773e88a71@6c48a", 14 | "displayName": "Road_Diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "cd8078ec-bc95-45af-a3db-736773e88a71", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "cd8078ec-bc95-45af-a3db-736773e88a71@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Road_Normal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Road_Normal.tga -------------------------------------------------------------------------------- /assets/textures/Chapter7/Road_Normal.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6a01d52b-8cc2-42fb-bf19-6a8acf801a05", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "3c318": { 12 | "importer": "texture", 13 | "uuid": "6a01d52b-8cc2-42fb-bf19-6a8acf801a05@3c318", 14 | "displayName": "Road_Normal", 15 | "id": "3c318", 16 | "name": "normalMap", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6a01d52b-8cc2-42fb-bf19-6a8acf801a05" 26 | }, 27 | "ver": "1.0.22", 28 | "imported": true, 29 | "files": [ 30 | ".json" 31 | ], 32 | "subMetas": {} 33 | } 34 | }, 35 | "userData": { 36 | "fixAlphaTransparencyArtifacts": true, 37 | "hasAlpha": true, 38 | "type": "normal map", 39 | "redirect": "6a01d52b-8cc2-42fb-bf19-6a8acf801a05@3c318" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Road_Specular.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Road_Specular.tga -------------------------------------------------------------------------------- /assets/textures/Chapter7/Road_Specular.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "e0938037-e46c-4f56-9c36-98905f6d9765", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "e0938037-e46c-4f56-9c36-98905f6d9765@6c48a", 14 | "displayName": "Road_Specular", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "e0938037-e46c-4f56-9c36-98905f6d9765", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "e0938037-e46c-4f56-9c36-98905f6d9765@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Wall_Diffuse.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Wall_Diffuse.tga -------------------------------------------------------------------------------- /assets/textures/Chapter7/Wall_Diffuse.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "42a8cbd1-ae3b-4eba-8f56-129b9109d6ef", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "42a8cbd1-ae3b-4eba-8f56-129b9109d6ef@6c48a", 14 | "displayName": "Wall_Diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "42a8cbd1-ae3b-4eba-8f56-129b9109d6ef", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "42a8cbd1-ae3b-4eba-8f56-129b9109d6ef@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Wall_Height.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Wall_Height.tga -------------------------------------------------------------------------------- /assets/textures/Chapter7/Wall_Height.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "7b9da454-e919-4d55-8e2c-9d5cecca18d0", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "7b9da454-e919-4d55-8e2c-9d5cecca18d0@6c48a", 14 | "displayName": "Wall_Height", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "7b9da454-e919-4d55-8e2c-9d5cecca18d0", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "7b9da454-e919-4d55-8e2c-9d5cecca18d0@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter7/Wall_Normal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter7/Wall_Normal.tga -------------------------------------------------------------------------------- /assets/textures/Chapter7/Wall_Normal.tga.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "692bc1a9-a8b9-400f-92dc-2e54c0b16c05", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "692bc1a9-a8b9-400f-92dc-2e54c0b16c05@6c48a", 14 | "displayName": "Wall_Normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "692bc1a9-a8b9-400f-92dc-2e54c0b16c05", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "692bc1a9-a8b9-400f-92dc-2e54c0b16c05@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Chapter8.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "1e8241dc-61dc-4eb2-a225-4a42e752b79e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Chapter8/transparent_texture.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Chapter8/transparent_texture.psd -------------------------------------------------------------------------------- /assets/textures/Chapter8/transparent_texture.psd.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6943ac15-a471-4947-95a8-c11244f5be09", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a", 14 | "displayName": "transparent_texture", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6943ac15-a471-4947-95a8-c11244f5be09", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "6943ac15-a471-4947-95a8-c11244f5be09@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Objects.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.2.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "03625266-ad49-4d91-9653-a226be396b9c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/textures/Objects/Box_Diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Objects/Box_Diffuse.png -------------------------------------------------------------------------------- /assets/textures/Objects/Box_Diffuse.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "eb74e86a-1d8a-4a2c-b875-d35949e03edb", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "eb74e86a-1d8a-4a2c-b875-d35949e03edb@6c48a", 14 | "displayName": "Box_Diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "eb74e86a-1d8a-4a2c-b875-d35949e03edb", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": true, 39 | "type": "texture", 40 | "redirect": "eb74e86a-1d8a-4a2c-b875-d35949e03edb@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Objects/Box_Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Objects/Box_Normal.png -------------------------------------------------------------------------------- /assets/textures/Objects/Box_Normal.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "58914c8e-eb5b-43c7-a4a7-c67235046329", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "58914c8e-eb5b-43c7-a4a7-c67235046329@6c48a", 14 | "displayName": "Box_Normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "58914c8e-eb5b-43c7-a4a7-c67235046329", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "58914c8e-eb5b-43c7-a4a7-c67235046329@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Objects/Sphere_Diffuse.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Objects/Sphere_Diffuse.JPG -------------------------------------------------------------------------------- /assets/textures/Objects/Sphere_Diffuse.JPG.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "7a45c92b-0fb8-48e8-b11b-36c8b53e9633", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "7a45c92b-0fb8-48e8-b11b-36c8b53e9633@6c48a", 14 | "displayName": "Sphere_Diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "7a45c92b-0fb8-48e8-b11b-36c8b53e9633", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "7a45c92b-0fb8-48e8-b11b-36c8b53e9633@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/textures/Objects/Sphere_Normal.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjfumac/CocosShaderBook/bf9e3fdfea36552a28072c204bf0233b7abb6654/assets/textures/Objects/Sphere_Normal.JPG -------------------------------------------------------------------------------- /assets/textures/Objects/Sphere_Normal.JPG.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.26", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "a6a10309-0cce-49d9-b196-b21189a458a2", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "a6a10309-0cce-49d9-b196-b21189a458a2@6c48a", 14 | "displayName": "Sphere_Normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "a6a10309-0cce-49d9-b196-b21189a458a2", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "a6a10309-0cce-49d9-b196-b21189a458a2@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CocosShader", 3 | "uuid": "2b86b410-279f-474a-8771-a89421cfbe6b", 4 | "creator": { 5 | "version": "3.8.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /settings/v2/packages/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.3.6" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/cocos-service.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "3.0.7", 3 | "game": { 4 | "name": "未知游戏", 5 | "app_id": "UNKNOW", 6 | "c_id": "0" 7 | }, 8 | "appConfigMaps": [ 9 | { 10 | "app_id": "UNKNOW", 11 | "config_id": "758660" 12 | } 13 | ], 14 | "configs": [ 15 | { 16 | "app_id": "UNKNOW", 17 | "config_id": "758660", 18 | "config_name": "Default", 19 | "config_remarks": "", 20 | "services": [] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /settings/v2/packages/device.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.1" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/information.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.0", 3 | "information": { 4 | "customSplash": { 5 | "id": "customSplash", 6 | "label": "customSplash", 7 | "enable": true, 8 | "customSplash": { 9 | "complete": false, 10 | "form": "https://creator-api.cocos.com/api/form/show?sid=2a30c93a70334eb148c9fee433e94160" 11 | } 12 | }, 13 | "removeSplash": { 14 | "id": "removeSplash", 15 | "label": "removeSplash", 16 | "enable": true, 17 | "removeSplash": { 18 | "complete": false, 19 | "form": "https://creator-api.cocos.com/api/form/show?sid=2a30c93a70334eb148c9fee433e94160" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /settings/v2/packages/program.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.3" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "general": { 3 | "highQuality": true 4 | }, 5 | "__version__": "1.0.5", 6 | "fbx": { 7 | "legacyFbxImporter": { 8 | "visible": true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | /* Base configuration. Do not edit this field. */ 3 | "extends": "./temp/tsconfig.cocos.json", 4 | 5 | /* Add your custom configuration here. */ 6 | "compilerOptions": { 7 | "strict": false 8 | } 9 | } 10 | --------------------------------------------------------------------------------