diff --git a/Mine-imator Purple.yyp b/Mine-imator Violet.yyp similarity index 99% rename from Mine-imator Purple.yyp rename to Mine-imator Violet.yyp index ad7f08dc8bf94c284017411595d32b029d94399d..70615b36626c9d8946846b78076bbd6b7d8d2ed3 100644 --- a/Mine-imator Purple.yyp +++ b/Mine-imator Violet.yyp @@ -14814,6 +14814,14 @@ "resourceType": "GMScript" } }, + { + "Key": "e0d4dfb7-ed8f-4849-b31a-d03c592aaa4b", + "Value": { + "id": "998695d1-cfc7-4689-912b-cb9768906292", + "resourcePath": "scripts\\action_tl_frame_cam_clrcor_temperature\\action_tl_frame_cam_clrcor_temperature.yy", + "resourceType": "GMScript" + } + }, { "Key": "e11bf2f0-afda-4217-b121-497bf48ffe38", "Value": { @@ -17394,6 +17402,7 @@ "b358d9f8-a534-4e3e-b7a5-6182248292ad", "7b98c592-8fe0-48fc-a1e9-3a1c482fac88", "ba0a482e-6a70-4abd-a6cf-9c35ee6b9d74", + "e0d4dfb7-ed8f-4849-b31a-d03c592aaa4b", "b3a28a22-643a-4921-ac7c-0380d429e864", "4d5b374d-f7fa-432c-908b-d9b0ec8e857d", "af0fc81b-dc27-4fb0-9a46-ee4e6c071a40", diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3a1611c491cf6b97adb07f213046d58988789b63 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Mine_imator Violet +![Mine_imator Violet](https://images.gitee.com/uploads/images/2021/0812/150358_be5486fa_8147965.png "68747470733a2f2f7777772e6d696e65696d61746f722e636f6d2f696d616765732f696e6465785f686561645f6c6f676f2e706e67.png") +#### 介绍 +Mine-imator violet + +#### 新增功能 +1. 新增嘴部动画机:用于自动生成嘴部模型和动画 +2. 新增摄像机焦距控件 +3. 新增色温调节 +4. 优化了亮度调节的算法 +5. 优化了bloom的渲染算法 + +#### 参与贡献 + +1. 亢体动画 +2. 瓦斯弹 +3. 林子 + diff --git a/datafiles/Data/Languages/english.milanguage b/datafiles/Data/Languages/english.milanguage index e55fc12bbad78d94b0bd79d493aaffdbaf32a751..e0d77facf7d11070baf52ff96ed80d2c1c42b4fd 100644 --- a/datafiles/Data/Languages/english.milanguage +++ b/datafiles/Data/Languages/english.milanguage @@ -3022,6 +3022,8 @@ "colorcorrectionsaturationtip": "Determines how saturated the final render will be.", "colorcorrectionvibrance": "Vibrance", "colorcorrectionvibrancetip": "Saturates less-saturated colors in the render.", + "colorcorrectiontemperature": "Temperature", + "colorcorrectiontemperaturetip": "The temperature of the image.", "colorcorrectioncolorburn": "Color burn", "colorcorrectioncolorburntip": "Applies a color to the render with a Color Burn blend mode.", "grain": "Film grain", diff --git a/scripts/action_tl_frame_cam_clrcor_temperature/action_tl_frame_cam_clrcor_temperature.gml b/scripts/action_tl_frame_cam_clrcor_temperature/action_tl_frame_cam_clrcor_temperature.gml new file mode 100644 index 0000000000000000000000000000000000000000..35a228bbc8e1a5df0cef3eea1b97a205c778d5d6 --- /dev/null +++ b/scripts/action_tl_frame_cam_clrcor_temperature/action_tl_frame_cam_clrcor_temperature.gml @@ -0,0 +1,7 @@ +/// action_tl_frame_cam_clrcor_temperature(value, add) +/// @arg value +/// @arg add + +tl_value_set_start(action_tl_frame_cam_clrcor_temperature, true) +tl_value_set(e_value.CAM_TEMPERATURE, argument0 / 100, argument1) +tl_value_set_done() diff --git a/scripts/action_tl_frame_cam_clrcor_temperature/action_tl_frame_cam_clrcor_temperature.yy b/scripts/action_tl_frame_cam_clrcor_temperature/action_tl_frame_cam_clrcor_temperature.yy new file mode 100644 index 0000000000000000000000000000000000000000..223d62b6cf9dffd28ab9f986510df66f0417c5f9 --- /dev/null +++ b/scripts/action_tl_frame_cam_clrcor_temperature/action_tl_frame_cam_clrcor_temperature.yy @@ -0,0 +1,8 @@ +{ + "id": "e0d4dfb7-ed8f-4849-b31a-d03c592aaa4b", + "modelName": "GMScript", + "mvc": "1.0", + "name": "action_tl_frame_cam_clrcor_temperature", + "IsCompatibility": false, + "IsDnD": false +} \ No newline at end of file diff --git a/scripts/app_startup_interface_tabs/app_startup_interface_tabs.gml b/scripts/app_startup_interface_tabs/app_startup_interface_tabs.gml index 106262d1f49d9d5531d077a74b5dfde8abd09c43..d5e43ee6435accc97aaac22bc855677961939160 100644 --- a/scripts/app_startup_interface_tabs/app_startup_interface_tabs.gml +++ b/scripts/app_startup_interface_tabs/app_startup_interface_tabs.gml @@ -537,6 +537,8 @@ with (frame_editor) tbx_saturation.suffix = "%" tbx_vibrance = new_textbox_integer() tbx_vibrance.suffix = "%" + tbx_temperature = new_textbox_integer() + tbx_temperature.suffix = "K" tbx_grain_strength = new_textbox_ninteger() tbx_grain_strength.suffix = "%" diff --git a/scripts/app_startup_lists/app_startup_lists.gml b/scripts/app_startup_lists/app_startup_lists.gml index 67977c8444158a20bf3c19e0fbfa3c13fc0c62c3..6e69956f7d5d70577cc8fedff435479c5773ff57 100644 --- a/scripts/app_startup_lists/app_startup_lists.gml +++ b/scripts/app_startup_lists/app_startup_lists.gml @@ -98,6 +98,7 @@ ds_list_add(value_name_list, "CAM_BRIGHTNESS", "CAM_SATURATION", "CAM_VIBRANCE", + "CAM_TEMPERATURE", "CAM_COLOR_BURN", "CAM_GRAIN", "CAM_GRAIN_STRENGTH", diff --git a/scripts/enums/enums.gml b/scripts/enums/enums.gml index af3ce07ab759a2eb4c93bb257750222c203fac56..6bf408a8580dfcd37c653c34d6d0577f1c929732 100644 --- a/scripts/enums/enums.gml +++ b/scripts/enums/enums.gml @@ -187,6 +187,7 @@ enum e_value CAM_BRIGHTNESS, CAM_SATURATION, CAM_VIBRANCE, + CAM_TEMPERATURE, CAM_COLOR_BURN, CAM_GRAIN, CAM_GRAIN_STRENGTH, diff --git a/scripts/shader_color_correction_set/shader_color_correction_set.gml b/scripts/shader_color_correction_set/shader_color_correction_set.gml index e716e699df7c6fe03cf5c90eefda15a9147bfc20..37fca27b66a189397f8d68619214ff4e5cc45004 100644 --- a/scripts/shader_color_correction_set/shader_color_correction_set.gml +++ b/scripts/shader_color_correction_set/shader_color_correction_set.gml @@ -4,4 +4,5 @@ render_set_uniform("uContrast", render_camera.value[e_value.CAM_CONTRAST] + 1) render_set_uniform("uBrightness", render_camera.value[e_value.CAM_BRIGHTNESS]) render_set_uniform("uSaturation", render_camera.value[e_value.CAM_SATURATION]) render_set_uniform("uVibrance", render_camera.value[e_value.CAM_VIBRANCE]) +render_set_uniform("uTemperature", render_camera.value[e_value.CAM_TEMPERATURE]) render_set_uniform_color("uColorBurn", render_camera.value[e_value.CAM_COLOR_BURN], 1) \ No newline at end of file diff --git a/scripts/shader_startup/shader_startup.gml b/scripts/shader_startup/shader_startup.gml index d4b10b8384234603e05b2843cb074f2af159a2e9..ed314da437b7b2f3c822caed1b1b4a7b0ab3a4ba 100644 --- a/scripts/shader_startup/shader_startup.gml +++ b/scripts/shader_startup/shader_startup.gml @@ -368,6 +368,7 @@ with (shader_map[?shader_color_correction]) new_shader_uniform("uBrightness") new_shader_uniform("uSaturation") new_shader_uniform("uVibrance") + new_shader_uniform("uTemperature") new_shader_uniform("uColorBurn") } diff --git a/scripts/tab_frame_editor_camera/tab_frame_editor_camera.gml b/scripts/tab_frame_editor_camera/tab_frame_editor_camera.gml index 19f29b82deed24ac06bd7e6c445da804e8a1ef67..be2409731629c49089c9200c057a79b0d593f98b 100644 --- a/scripts/tab_frame_editor_camera/tab_frame_editor_camera.gml +++ b/scripts/tab_frame_editor_camera/tab_frame_editor_camera.gml @@ -369,6 +369,10 @@ if (tl_edit.value[e_value.CAM_COLOR_CORRECTION] && checkbox_expand_frameeditor_c draw_meter("frameeditorcameracolorcorrectionvibrance", dx, dy, dw, round(tl_edit.value[e_value.CAM_VIBRANCE] * 100), 50, 0, 100, 0, 1, tab.camera.tbx_vibrance, action_tl_frame_cam_clrcor_vibrance, capwid) tab_next() + tab_control_meter() + draw_meter("frameeditorcameracolorcorrectiontemperature", dx, dy, dw, round(tl_edit.value[e_value.CAM_TEMPERATURE] * 100), 50, -30, 30, 0, 1, tab.camera.tbx_temperature, action_tl_frame_cam_clrcor_temperature, capwid) + tab_next() + tab_control_color() draw_button_color("frameeditorcameracolorcorrectioncolorburn", dx, dy, dw, tl_edit.value[e_value.CAM_COLOR_BURN], c_white, false, action_tl_frame_cam_clrcor_color_burn) tab_next() diff --git a/scripts/tl_update_values/tl_update_values.gml b/scripts/tl_update_values/tl_update_values.gml index e7bfafc429d6effffcc8cfcc50a08079cabcde11..d5a066c8e93ab150c8a9efd8adcdbdb2baa339ce 100644 --- a/scripts/tl_update_values/tl_update_values.gml +++ b/scripts/tl_update_values/tl_update_values.gml @@ -236,6 +236,7 @@ if (value_type[e_value_type.CAMERA]) tl_update_values_ease(e_value.CAM_SATURATION, trans, p) tl_update_values_ease(e_value.CAM_VIBRANCE, trans, p) tl_update_values_ease(e_value.CAM_COLOR_BURN, trans, p) + tl_update_values_ease(e_value.CAM_TEMPERATURE, trans, p) tl_update_values_ease(e_value.CAM_GRAIN, trans, p) tl_update_values_ease(e_value.CAM_GRAIN_STRENGTH, trans, p) diff --git a/scripts/tl_value_default/tl_value_default.gml b/scripts/tl_value_default/tl_value_default.gml index cf1bc8e2dfe429c9def687b3902eb84ca973ee0b..50468ae4776f21e287454ef6e8befb2802d27fe4 100644 --- a/scripts/tl_value_default/tl_value_default.gml +++ b/scripts/tl_value_default/tl_value_default.gml @@ -61,6 +61,7 @@ switch (argument0) case e_value.CAM_BRIGHTNESS: return 0 case e_value.CAM_SATURATION: return 1 case e_value.CAM_VIBRANCE: return 0 + case e_value.CAM_TEMPERATURE: return 0 case e_value.CAM_COLOR_BURN: return c_white case e_value.CAM_GRAIN_STRENGTH: return .10 case e_value.CAM_GRAIN_SATURATION: return .10 diff --git a/shaders/shader_color_correction/shader_color_correction.fsh b/shaders/shader_color_correction/shader_color_correction.fsh index 52589f6a6214b97532efea191764f361338c4cf2..feff3ff237bc96970b8f4f90fe845058dca1b240 100644 --- a/shaders/shader_color_correction/shader_color_correction.fsh +++ b/shaders/shader_color_correction/shader_color_correction.fsh @@ -69,11 +69,76 @@ void main() lowp float B = (RGB.g <0.5? (2.0* RGB.g * warmFilter.g) : (1.0-2.0* (1.0 - RGB.g) * (1.0- warmFilter.g))); lowp float C = (RGB.b <0.5? (2.0* RGB.b * warmFilter.b) : (1.0-2.0* (1.0 - RGB.b) * (1.0- warmFilter.b))); lowp vec3 processed = vec3(A,B,C); - uTemperature = (uTemperature-0.5) * 10.0 - 10.0;//等你写完控件我再改这行 gl_FragColor = vec4(mix(RGB, processed,uTemperature), baseColor.a); - //gl_FragColor = baseColor; +} + + +//HSL brightness adjustment(Replaceable) +/*void main() +{ + vec4 baseColor = texture2D(gm_BaseTexture, vTexCoord); + + //Convert the RGB value in the range of 0-1 to 0-255 + float r = baseColor.r * 255.0; + float g = baseColor.g * 255.0; + float b = baseColor.b * 255.0; + + //float L=((max(r,max(g,b))+min(r,min(g,b)))/2.0); + //Another brightness calculation formula(Replaceable) + float L=0.3*r+0.6*g+0.1*b; + float rHS = 0.0; + float gHS = 0.0; + float bHS = 0.0; + + if(L > 128.0) + { + rHS = (r * 128.0 - (L - 128.0) * 256.0) / (256.0 - L); + gHS = (g * 128.0 - (L - 128.0) * 256.0) / (256.0 - L); + bHS = (b * 128.0 - (L - 128.0) * 256.0) / (256.0 - L); + } + else + { + rHS = r * 128.0 / L; + gHS = g * 128.0 / L; + bHS = b * 128.0 / L; + } + + float delta = uBrightness*256.0; + float newL = L + delta - 128.0; + float newR = .0; + float newG = .0; + float newB = .0; + + if(newL > 0.0) { + newR = rHS + (256.0 - rHS) * newL / 128.0; + newG = gHS + (256.0 - gHS) * newL / 128.0; + newB = bHS + (256.0 - bHS) * newL / 128.0; + } else { + newR = rHS + rHS * newL / 128.0; + newG = gHS + gHS * newL / 128.0; + newB = bHS + bHS * newL / 128.0; + + } + baseColor.rgb =vec3(newR/255.0, newG/255.0, newB/255.0); + baseColor.rgb = (baseColor.rgb - vec3(0.5)) * vec3(uContrast) + vec3(0.5); + baseColor.rgb = clamp(baseColor.rgb, vec3(0.0), vec3(1.0)); + + vec3 W = vec3(0.2125, 0.7154, 0.0721); + vec3 satIntensity = vec3(dot(baseColor.rgb, W)); + baseColor.rgb = mix(satIntensity, baseColor.rgb, uSaturation); + baseColor.rgb = clamp(baseColor.rgb, vec3(0.0), vec3(1.0)); + + satIntensity = vec3(dot(baseColor.rgb, W)); + float sat = rgbtohsb(baseColor).g; + float vibrance = 1.0 - pow(pow(sat, 8.0), .15); + baseColor.rgb = mix(satIntensity, baseColor.rgb, 1.0 + (vibrance * uVibrance)); + baseColor.rgb = clamp(baseColor.rgb, vec3(0.0), vec3(1.0)); + + baseColor.rgb = 1.0 - (1.0 - baseColor.rgb) / uColorBurn.rgb; + + gl_FragColor = baseColor; } @@ -143,4 +208,3 @@ void main() gl_FragColor = baseColor; }*/ - diff --git a/views/242e7506-a799-4232-bb73-c9058f7c416b.yy b/views/242e7506-a799-4232-bb73-c9058f7c416b.yy index 7844a32c6663e5750d4072ceb393d107c67c95ec..89ddb3731c1d358e9cff8e65585ea9d5b5c42e2f 100644 --- a/views/242e7506-a799-4232-bb73-c9058f7c416b.yy +++ b/views/242e7506-a799-4232-bb73-c9058f7c416b.yy @@ -9,7 +9,8 @@ "a5002786-20f1-4e50-9894-270217f12d7b", "b358d9f8-a534-4e3e-b7a5-6182248292ad", "7b98c592-8fe0-48fc-a1e9-3a1c482fac88", - "ba0a482e-6a70-4abd-a6cf-9c35ee6b9d74" + "ba0a482e-6a70-4abd-a6cf-9c35ee6b9d74", + "e0d4dfb7-ed8f-4849-b31a-d03c592aaa4b" ], "filterType": "GMScript", "folderName": "Color correction",